> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Suspend computer

> Pause a running computer with its memory saved.

Suspends a running computer. Its memory and disk are saved, so open windows and running processes pick up exactly where they were. A suspended computer may be moved off its host to storage. [Resume](/api-reference/computers/resume) or [Start](/api-reference/computers/start) then wakes it in about a minute.

<Info>
  Suspend is available for Linux computers without a GPU. A computer that wakes from storage gets a **new `instance_id`**, so keep its UUID as your handle and re-fetch [`GET /computers/{id}`](/api-reference/computers/get) after a wake. To release a computer and keep only its disk, use [Stop](/api-reference/computers/stop) instead.
</Info>

## Path parameters

<ParamField path="id" type="string" required>
  Computer UUID or `instance_id`. Both resolve to the same computer.
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  `true` when the computer is suspended, or its suspend is being saved.
</ResponseField>

<ResponseField name="status" type="string">
  `suspended` with `200`: the computer is paused. `suspending` with `202`: its memory is still being saved. Poll [Get suspension](/api-reference/computers/suspension) until `status` reads `suspended`.
</ResponseField>

<ResponseField name="storage" type="object">
  Present only when the computer's copy is being saved to storage in the background: `{ "state": "saving", "region": "…" }`. `region` can be `null`. The computer can be resumed or deleted meanwhile.
</ResponseField>

Suspending is idempotent. A computer that is already `suspended` returns `200` with `status: "suspended"`, and one whose suspend is still being saved returns `202` with `status: "suspending"`.

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://www.orgo.ai/api/computers/$COMPUTER_ID/suspend \
    -H "Authorization: Bearer $ORGO_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      f"https://www.orgo.ai/api/computers/{computer_id}/suspend",
      headers={"Authorization": f"Bearer {api_key}"}
  )

  print(response.json()["status"])
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`https://www.orgo.ai/api/computers/${computerId}/suspend`, {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${apiKey}` }
  });

  const { status } = await response.json();
  console.log(status);
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "success": true,
  "status": "suspended",
  "storage": { "state": "saving", "region": "nyc" }
}
```

## Errors

| Status | Body | When |
| - | - | - |
| `400` | `{ "error": "…", "code": "suspend_unsupported" }` | The computer cannot be suspended: it is not Linux, or it has a GPU. `code` is `DEVICE_LIFECYCLE_UNSUPPORTED` for a device Orgo manages directly. |
| `401` | `{ "error": "Invalid API key" }` | The Bearer token starts with `sk_` but is not a known Orgo key. |
| `401` | `{ "error": "Authentication required" }` | No `Authorization` header, or a Bearer token that is not an `sk_` key. |
| `402` | `{ "error": "Choose a plan to continue." }` | The computer is a trial computer whose trial has ended. `error` is "Manage this computer’s payment in Account → Usage." when its payment is managed there. |
| `403` | `{ "error": "You do not have access to this workspace." }` | You are not a member of the computer's workspace. |
| `403` | `{ "error": "This workspace is view-only. Ask the owner for write access (workspace_read_only)." }` | You have view-only access to the workspace. |
| `403` | `{ "error": "This API key cannot access this workspace (workspace_scope_mismatch)." }` | The API key is scoped to a different workspace. |
| `404` | `{ "error": "Desktop not found" }` | No computer matches the id. |
| `409` | `{ "error": "Use Stop to save your files and release hourly compute.", "code": "HOURLY_USE_STOP" }` | The computer runs by the hour. Stop it instead. |
| `409` | `{ "error": "Manage this reservation in Account → Usage.", "code": "ALLOCATION_MANAGED" }` | The computer is part of a reservation. |
| `409` | `{ "error": "This computer is being moved to another host. Try again in a few minutes.", "code": "migrating" }` | The computer is being moved to another host. |
| `409` | `{ "error": "This computer is still finishing waking up. Try again in a minute.", "code": "converging" }` | The computer woke from storage moments ago and is still settling. Nothing was saved. Carries `Retry-After: 30`. |
| `409` | `{ "error": "Computer is not running (status: stopped)" }` | The computer is not `running`, `suspending`, or `suspended`. |
| `409` | `{ "error": "Computer can't be suspended right now (status: …)" }` | Its host refused the suspend and the computer is in another state there. |
| `500` | `{ "error": "…" }` | The suspend failed. |
| `503` | `{ "error": "Computer not ready. VMM has not assigned a server yet" }` | The computer has no host on record yet. |
| `503` | `{ "error": "Service temporarily unavailable. …" }` | Orgo could not verify the credential because of a server-side fault. The response carries `Retry-After: 5`. Retry after that delay. |


## OpenAPI

````yaml POST /computers/{id}/suspend
openapi: 3.1.0
info:
  title: Orgo API
  description: >-
    Launch cloud computers that AI agents can control and interact with. Create
    workspaces, provision computers, and control them programmatically.
  version: 2.0.0
  contact:
    name: Orgo Support
    email: spencer@orgo.ai
    url: https://orgo.ai
servers:
  - url: https://www.orgo.ai/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Account
    description: >-
      Account capacity: how many computers an account may run, and adding or
      giving back more.
  - name: Agent accounts
    description: >-
      Accounts an AI agent makes for itself, and the claim link a person uses to
      take one over.
  - name: Clients
    description: >-
      Run Orgo for your clients from your own app: a workspace and scoped key
      each, billed to you or to them.
  - name: Workspaces
    description: Organize computers into named workspaces
  - name: Computers
    description: Provision and manage virtual computers
  - name: Computer Lifecycle
    description: Start, stop, and restart computers
  - name: Computer Actions
    description: Control mouse, keyboard, and execute commands
  - name: Screens
    description: >-
      More than one desktop on a single computer. Each screen is its own X
      server with its own cursor and window manager, so an agent working on one
      cannot disturb another.
  - name: Files
    description: Upload and download files
  - name: Templates
    description: Author, build, and launch reproducible computers from templates
  - name: Chat
    description: Run an agent on a computer through OpenAI-compatible chat completions.
paths:
  /computers/{id}/suspend:
    post:
      tags:
        - Computer Lifecycle
      summary: Suspend computer
      description: >-
        Pauses a running computer with its memory: every open window and running
        process survives, and Resume brings it back as it was. The host slot is
        released. A suspend saved to storage first answers `202` with `status:
        "suspending"`; poll `GET /computers/{id}/suspension` until it reads
        `suspended`. Suspending a `suspended` computer succeeds and changes
        nothing. An hourly computer uses Stop instead. Accepts the computer UUID
        or its `instance_id`.
      operationId: suspendComputer
      parameters:
        - name: id
          in: path
          required: true
          description: Computer UUID or instance_id
          schema:
            type: string
      responses:
        '200':
          description: >-
            Suspended. `storage` is present when its copy is being saved to
            storage in the background.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                    enum:
                      - suspended
                  storage:
                    type: object
                    properties:
                      state:
                        type: string
                        enum:
                          - saving
                      region:
                        type:
                          - string
                          - 'null'
              example:
                success: true
                status: suspended
        '202':
          description: >-
            Accepted: the suspend is being saved to storage. Poll `GET
            /computers/{id}/suspension`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                    enum:
                      - suspending
              example:
                success: true
                status: suspending
        '400':
          description: >-
            This computer can't be suspended (`suspend_unsupported`: only Linux
            without a GPU; `DEVICE_LIFECYCLE_UNSUPPORTED`: a device Orgo
            manages).
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - suspend_unsupported
                      - DEVICE_LIFECYCLE_UNSUPPORTED
              example:
                error: …
                code: suspend_unsupported
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/TrialInactive'
        '403':
          description: >-
            View-only access (`workspace_read_only`), or no access to the
            computer.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - workspace_read_only
              example:
                error: Workspace access is view-only.
                code: workspace_read_only
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            The suspend was refused: not `running`, being moved (`migrating`),
            still finishing a wake from storage (`converging`, `Retry-After:
            30`), an hourly computer (`HOURLY_USE_STOP`), or a dedicated
            purchase (`ALLOCATION_MANAGED`).
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - migrating
                      - converging
                      - HOURLY_USE_STOP
                      - ALLOCATION_MANAGED
              examples:
                not-running:
                  summary: Not running
                  value:
                    error: 'Computer is not running (status: stopped)'
                hourly:
                  summary: Hourly computer
                  value:
                    error: Use Stop to save your files and release hourly compute.
                    code: HOURLY_USE_STOP
                converging:
                  summary: Still finishing a wake
                  value:
                    error: >-
                      This computer is still finishing waking up. Try again in a
                      minute.
                    code: converging
        '500':
          description: The suspend failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Failed to suspend
        '503':
          description: >-
            The computer has no host on record yet, or the credential could not
            be verified. Retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Computer not ready. VMM has not assigned a server yet
components:
  responses:
    Unauthorized:
      description: 'No usable credential. Send `Authorization: Bearer $ORGO_API_KEY`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalid-key:
              summary: The key is not one of yours
              value:
                error: Invalid API key
            no-credential:
              summary: No key and no session
              value:
                error: Authentication required
    TrialInactive:
      description: >-
        The computer is a free trial computer whose trial is no longer active,
        or it is paid for by its own subscription or dedicated purchase and that
        payment has lapsed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            trial:
              summary: Trial no longer active
              value:
                error: Choose a plan to continue.
            payment:
              summary: The computer's own payment has lapsed
              value:
                error: Manage this computer’s payment in Account → Usage.
    NotFound:
      description: No computer with this id on your account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Desktop not found
  schemas:
    Error:
      type: object
      description: >-
        The base error body. Every failure carries `error`; individual endpoints
        add the fields named in the schemas below.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable message.
          example: Access denied
        code:
          type: string
          description: >-
            Machine-readable reason. Present on the failures that define one,
            absent otherwise.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication. Get your key at orgo.ai/workspaces

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.