> ## 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.

# Resume computer

> Bring a suspended computer back where it left off, optionally for a set number of hours.

Resumes a `suspended` computer. Its memory is restored, so open windows and running processes continue exactly where they were. A computer still on its host comes back in seconds. One that was moved off its host to storage is woken on a host with room, in about a minute.

> [!NOTE]
>
> A computer woken from storage gets a **new `instance_id`** and can land on a different host with a different address and ports. Keep its UUID as your handle and re-fetch [`GET /computers/{id}`](https://docs.orgo.ai/api-reference/computers/get) once it is `running`. While it wakes, `GET /computers/{id}` reports progress in `asleep.waking`.

## Path parameters

**id** `string` *required*

Computer UUID or `instance_id`. Both resolve to the same computer. A computer asleep in storage has no `instance_id`, so address it by UUID.

## Body parameters

The body is optional. When you send one, it must be a JSON object.

**ends\_in\_hours** `integer | null`

How long the computer runs before it ends, as a whole number of hours: `1` to `720` (30 days). The hours count from when the computer is running, not from the request. `null` takes any end off. Send `ends_in_hours` or `ends_at`, not both. Omitted, the resume sets no end, as described in [Resume for a set number of hours](#resume-for-a-set-number-of-hours).

**ends\_at** `string | null`

When the computer ends, as an ISO 8601 time: in the future, and at most 720 hours from now. `null` takes any end off.

**on\_end** `string | null`

Not a choice: a computer with an end is deleted when its time is up. `"delete"`, sent with `ends_in_hours` or `ends_at`, is accepted and changes nothing. Sent without either it returns `400` with code `INVALID_ENDS`: `on_end goes with ends_at or ends_in_hours. Without an end it changes nothing.` Any other value, `"stop"` included, returns `400` with code `INVALID_ENDS`: `A computer with an end is deleted when its time is up. To keep a computer, leave out the end.` Nothing resumes.

## Response

**success** `boolean`

`true` when the computer is running, or its resume or wake has started.

**status** `string`

`running` with `200`: the computer is back. `resuming` with `202`: its memory is still being brought back from storage. Poll [Get suspension](https://docs.orgo.ai/api-reference/computers/suspension.md) until `status` reads `running`. Absent on a wake from storage.

**pending** `boolean`

Present and `true` with every `202`.

**waking** `boolean`

Present and `true` with a `202` for a computer woken from storage.

**expected\_seconds** `integer`

Present alongside `waking`. About how long the wake takes.

The fields below are present only when the body sent `ends_in_hours` or `ends_at`.

**ends\_at** `string | null`

When the computer ends now, or `null` when it never ends.

**on\_end** `string | null`

Read only. `"delete"` once an end is set, since the computer is deleted then, or `null` with no end. With `end_not_set`, the computer's current value, which is `"stop"` for an end set before every end deleted the computer.

**ended\_at** `string | null`

`null` once the end is set. With `end_not_set`, the computer's current value.

**deletes\_at** `string | null`

When Orgo deletes the computer: `ends_at` once an end is set, or `null` with no end. With `end_not_set`, the computer's current value.

**prepaid\_until** `string | null`

Present for a computer that runs by the hour once its end is set. When its prepaid run ends, or `null` when its time is not prepaid.

**prepaid\_cents** `integer | null`

Present alongside `prepaid_until`. What is held from your credits for the run, in cents. `null` when `prepaid_until` is.

**prepay\_returned\_cents** `integer`

Present when some of an earlier prepay came back to your credits, in cents.

**prepay\_warning** `string`

Present when the end was set but its time was not prepaid. The two messages are listed in [Update computer](https://docs.orgo.ai/api-reference/computers/update.md#response).

**end\_not\_set** `object`

Present when the end you asked for was not set: `error` (why, in words) and `code`, beside the end the computer has. With every `202` that asked for an end, `code` is `STILL_RESUMING`. The resume itself is not refused for it. The codes are listed in [When the end is not set](#when-the-end-is-not-set).

Resuming is idempotent. A computer that is already `running` returns `200` with `status: "running"`, and one already resuming returns `202` again. A running computer gets the end you send. A computer that runs by the hour has its running time reserved from credit before it resumes.

## Example

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

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

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

print(response.status_code, response.json())
```

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

console.log(response.status, await response.json());
```

### Response

```json theme={null}
{
  "success": true,
  "status": "running"
}
```

A computer woken from storage returns `202`:

```json theme={null}
{
  "success": true,
  "pending": true,
  "waking": true,
  "expected_seconds": 90
}
```

### Resume for 4 hours

```bash theme={null}
curl -X POST https://www.orgo.ai/api/computers/$COMPUTER_ID/resume \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ends_in_hours": 4}'
```

A computer on its host is back at once, with its end:

```json theme={null}
{
  "success": true,
  "status": "running",
  "ends_at": "2026-04-07T14:35:04.000Z",
  "on_end": "delete",
  "ended_at": null,
  "deletes_at": "2026-04-07T14:35:04.000Z"
}
```

A computer that runs by the hour also carries `prepaid_until` and `prepaid_cents`. One whose memory is still coming back answers `202` without an end:

```json theme={null}
{
  "success": true,
  "status": "resuming",
  "pending": true,
  "ends_at": null,
  "on_end": null,
  "ended_at": null,
  "deletes_at": null,
  "end_not_set": {
    "error": "No end was set: it is still resuming. Set it once it is running.",
    "code": "STILL_RESUMING"
  }
}
```

## Resume for a set number of hours

Send `ends_in_hours` or `ends_at` to give the computer an end as it resumes. When the end is up Orgo deletes the computer, running or not, with everything on it, as described in [Computers with an end](https://docs.orgo.ai/api-reference/computers/create.md#computers-with-an-end). To keep a computer, send no end.

* **The end is checked before anything resumes**, by the rules [Update computer](https://docs.orgo.ai/api-reference/computers/update.md) uses. A bad one returns `400`, `403`, or `503`, listed in [Errors](#errors), and nothing resumes.
* **The end is set once the computer is running.** A resume that comes back at once (`200`) sets it. A resume still under way (`202`, `resuming` or `waking`) sets none and says `end_not_set` with code `STILL_RESUMING`. Set the end with [Update computer](https://docs.orgo.ai/api-reference/computers/update.md) once the computer is `running`.
* **A suspended computer whose end has passed** but that Orgo is not deleting yet has its end taken off before it resumes, so it comes back as an ordinary computer, with the new end if you sent one. While Orgo is deleting it for its end, the resume returns `409` with code `COMPUTER_END_DELETING`.
* **A computer that runs by the hour** prepays the run to the new end once it is running, under the rules in [Who can prepay](https://docs.orgo.ai/api-reference/computers/update.md#who-can-prepay). When the credit is short or you may not prepay, the end is still set, the time is billed by the hour, and the answer carries `prepay_warning`.
* **A computer's own key, its identity token, and a key for one computer** can resume the computer but cannot set its end: a body that names an end returns `403` with code `computer_key` or `computer_scope`, and nothing resumes.

### When the end is not set

An end that could not be set never fails the resume. The answer carries `end_not_set`, beside the end the computer has:

| `code` | Why |
| - | - |
| `STILL_RESUMING` | The `202`: the computer is not running yet. `No end was set: it is still resuming. Set it once it is running.` |
| `INVALID_ENDS` | The `ends_at` you sent passed while the computer resumed. |
| `COMPUTER_BUSY` | Another operation held the computer. Set the end again in a minute. |
| `insufficient_credit` | The end is later than a running prepay, and your credit cannot cover the extra. Also carries `needed_cents`, `available_cents`, and `keep_cents` when there is any, as on [Update computer](https://docs.orgo.ai/api-reference/computers/update.md#errors). |
| `ENDS_UNAVAILABLE` | Ends are not set up on this server yet. |
| `NOT_FOUND` | The computer is gone. |
| `END_NOT_SET` | Something else went wrong. Set the end again with [Update computer](https://docs.orgo.ai/api-reference/computers/update.md). |

Except for `STILL_RESUMING`, each `error` starts with `Resumed, but no end was set.`

## Errors

| Status | Body | When |
| - | - | - |
| `400` | `{ "error": "Expected a JSON object with an optional ends_in_hours or ends_at." }` | The body is not empty and is not a JSON object. |
| `400` | `{ "error": "…", "code": "INVALID_ENDS" }` | `ends_in_hours` or `ends_at` breaks the rules [Update computer](https://docs.orgo.ai/api-reference/computers/update.md#errors) applies, with the same messages, such as `ends_in_hours must be a whole number of hours from 1 to 720, or null for never.` Or `on_end` is anything but `"delete"` or `null`, or is sent without an end, as described for `on_end` in [Body parameters](#body-parameters). Nothing resumed. |
| `400` | `{ "error": "Only Linux and Windows computers can have an end.", "code": "ENDS_NOT_SUPPORTED" }` | The body gives an end to a computer that cannot have one. Nothing resumed. |
| `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": "Your plan does not include running computers. Upgrade to resume this computer.", "code": "upgrade_required" }` | The workspace owner's plan no longer funds running computers. |
| `402` | `{ "error": "Add credit to start this computer.", "code": "INSUFFICIENT_COMPUTE_CREDIT" }` | The computer runs by the hour and there is not enough credit to reserve its running time. |
| `402` | `{ "error": "…", "code": "bops_free_hours" }` | The computer is the free Bops computer and has used this month's free hours. |
| `402` | `{ "error": "Choose a plan to continue." }` | The computer is a trial computer whose trial has ended. A computer paid by its own subscription or reservation whose payment has lapsed gets "Manage this computer’s payment in Account → Usage." instead. |
| `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).", "code": "workspace_read_only" }` | You have Can chat access to the workspace. |
| `403` | `{ "error": "This API key cannot access this workspace (workspace_scope_mismatch).", "code": "workspace_scope_mismatch" }` | The API key is scoped to a different workspace. |
| `403` | `{ "error": "A computer’s own key can’t set when a computer ends. Use your account or the web UI.", "code": "computer_key" }` | The body names an end, and the caller is the computer's own key. Its identity token gets `A computer’s identity token can’t set when a computer ends. Use your account or the web UI.` Nothing resumed. |
| `403` | `{ "error": "A key for one computer can’t set when a computer ends. Use a key for your account or the web UI.", "code": "computer_scope" }` | The body names an end, and the caller is a key for one computer. Nothing resumed. |
| `401`, `403` | `{ "error": "…", "code": "key_permission" }` | The key itself was refused before the resume ran, such as a restricted key without Computers write, or an expired key (`401`, `key_expired`). Listed in [Codes any endpoint can return to a key](https://docs.orgo.ai/api-reference/api-keys/manage.md#codes-any-endpoint-can-return-to-a-key). |
| `404` | `{ "error": "Computer not found (computer_not_found).", "code": "computer_not_found" }` | No computer matches the id. Signed in with a session instead of a key, the body is `{ "error": "Desktop not found" }`. |
| `409` | `{ "error": "Computer is not suspended (status: frozen)" }` | The computer is not `suspended`, `suspending`, `resuming`, or `running`. Use [Start](https://docs.orgo.ai/api-reference/computers/start.md) for a `frozen` or `stopped` computer. |
| `409` | `{ "error": "This computer is being deleted because its time ran out.", "code": "COMPUTER_END_DELETING" }` | Orgo is deleting the computer because its time ran out: at its end, or 7 days after an end set before every end deleted the computer. |
| `409` | `{ "error": "This computer is still being saved to storage. Try again once it shows Suspended.", "code": "suspend_in_progress" }` | A suspend is still being saved. |
| `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": "…", "code": "suspend_state_missing" }` or `"disk_changed"` | The saved memory is missing, or the disk changed after the suspend. The computer stays suspended. Contact support. |
| `409` | `{ "error": "Computer can't be resumed right now (status: …)" }` | Its host refused the resume and the computer is in another state there. A computer that changed while it resumed gets `Computer can't be resumed right now. Try again in a moment.` instead. |
| `429` | `{ "error": "Too many starts, stops and other changes to this computer this minute (10 a minute). Try again in 20 seconds.", "code": "rate_limited", "limit": "computer_lifecycle_per_computer_per_minute", "retry_after": 20 }` | The workspace owner's plan rate limit for starts, stops and other changes, for the account or for this computer. Carries a `Retry-After` header. Nothing resumed. See [Plan rate limits](https://docs.orgo.ai/guides/account-limits.md#plan-rate-limits). |
| `500` | `{ "error": "…" }` | The resume failed. |
| `503` | `{ "error": "…", "code": "…" }` | Nothing was tried. `code` is `suspend_state_unavailable` (the saved memory can't be reached) or `insufficient_disk` (its host has no room yet). Carries `Retry-After: 30`. |
| `503` | `{ "error": "…", "code": "…" }` | A wake from storage failed under 30 seconds ago. `code` is `wake_failed`, `no_capacity`, or `saved_state_unavailable`. Carries `retry_after` and `Retry-After`. |
| `503` | `{ "error": "…", "code": "…" }` | An hourly computer's running time could not be reserved yet. `code` is `HOURLY_FUNDING_UNAVAILABLE`, `HOURLY_WORKER_UNAVAILABLE`, or `FREE_HOURLY_BUSY` (every free running place is taken). Retry. |
| `503` | `{ "error": "Computer has no host recorded. Contact support" }` | The computer has no host on record. |
| `503` | `{ "error": "Ends aren’t set up on this server yet. Try again later, or leave the end out.", "code": "ENDS_UNAVAILABLE", "retryable": true }` | The body names an end, or `on_end`, where ends are not set up yet. Nothing resumed. |
| `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. |

A `402` for credit or the plan, a `402` with no `code`, and `FREE_HOURLY_BUSY` also carry `retryable` (whether the same request can work later as it is), `docs_url`, and `next`, the call that fixes it, as `{ "method", "url", "why" }` with a `body` when the call needs one. When `next` adds credit, the body also has `add_credit_url`, the page where a person adds it, and with a Bearer credential `error` ends with the call, such as ` Next: POST /api/credits/checkout.`


## OpenAPI

````yaml POST /computers/{id}/resume
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: contact@orgo.ai
    url: https://orgo.ai
servers:
  - url: https://www.orgo.ai/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Support
    description: >-
      Orgo’s support agent, for programs: ask how to do something in Orgo and
      get an answer with full URLs and copyable commands.
  - name: Account
    description: >-
      Account capacity: how many computers an account may run, and adding or
      giving back more. Residential data: what the account has left for
      residential IPs, and buying more from credits.
  - 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: Public URLs
    description: Share an app running on a computer at an https address on orgo.dev.
  - 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.
  - name: Workflows
    description: >-
      Routines that run the same way every time: a start, then steps. Make them
      from plain words or lines, check them, run them and follow their runs (in
      preview).
paths:
  /computers/{id}/resume:
    post:
      tags:
        - Computer Lifecycle
      summary: Resume computer
      description: >-
        Brings a `suspended` computer back with its memory. On its host it is
        back in seconds. A computer stored off its host, or whose memory comes
        back from storage, answers `202`: poll `GET /computers/{id}` or `GET
        /computers/{id}/suspension` until it is `running` (about a minute). A
        `running` computer returns `200` and changes nothing, except that an end
        the body sends is set. Accepts the computer UUID or its `instance_id`.
        The body may set when the computer ends, as on Start: `ends_in_hours` or
        `ends_at` (the computer is deleted when it is up), checked before
        anything resumes and set once the computer is running. A resume still
        under way (`202`) sets no end and says `end_not_set` with code
        `STILL_RESUMING`. A suspended computer whose end has passed, but that
        Orgo is not deleting yet, has its end taken off before it resumes.
      operationId: resumeComputer
      parameters:
        - name: id
          in: path
          required: true
          description: Computer UUID or instance_id
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                on_end:
                  type:
                    - string
                    - 'null'
                  enum:
                    - delete
                    - null
                  description: >-
                    Not a choice: a computer with an end is deleted when its
                    time is up, running or not, with everything on it.
                    `"delete"`, sent with `ends_in_hours` or `ends_at`, is
                    accepted and changes nothing. Without either it returns
                    `400` (`INVALID_ENDS`): `on_end goes with ends_at or
                    ends_in_hours. Without an end it changes nothing.` Any other
                    value, `"stop"` included, returns `400` (`INVALID_ENDS`): `A
                    computer with an end is deleted when its time is up. To keep
                    a computer, leave out the end.`
                ends_in_hours:
                  type:
                    - integer
                    - 'null'
                  minimum: 1
                  maximum: 720
                  description: >-
                    How long the computer runs before it ends, in whole hours,
                    counted from when it is running. `null` takes any end off.
                    Send `ends_in_hours` or `ends_at`, not both. Checked before
                    anything resumes: a bad value returns `400` and nothing
                    resumes.
                ends_at:
                  type:
                    - string
                    - 'null'
                  format: date-time
                  description: >-
                    When the computer ends: in the future, at most 720 hours
                    from now. `null` takes any end off.
            examples:
              hours:
                summary: Run for 4 hours
                value:
                  ends_in_hours: 4
              at:
                summary: End at a time
                value:
                  ends_at: '2026-04-08T09:00:00Z'
              never:
                summary: Take any end off
                value:
                  ends_in_hours: null
      responses:
        '200':
          description: Running.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                    enum:
                      - running
                  ends_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Present when the body sent an end. When the computer ends.
                      `null` when it never ends.
                  on_end:
                    type:
                      - string
                      - 'null'
                    enum:
                      - delete
                      - stop
                      - null
                    description: >-
                      Present when the body sent an end. What happens at the
                      end, read only: `"delete"` (deleted at `ends_at`, as every
                      end set now is), `"stop"` (an end set before every end
                      deleted the computer: stopped at `ends_at`, deleted 7 days
                      later unless it is started), or `null` with no end.
                  ended_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Present when the body sent an end. When Orgo stopped the
                      computer because its time ran out, or marked it ended if
                      it was already off. `null` when it has not ended, and
                      after any change of the end.
                  deletes_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Present when the body sent an end. When Orgo deletes the
                      computer: `ends_at` once an end is set, or `null` with no
                      end. With `end_not_set`, the computer's current value.
                  prepaid_until:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Present for a computer that runs by the hour once its end
                      is set. A computer that runs by the hour: when its prepaid
                      run ends. `null` when its time is not prepaid.
                  prepaid_cents:
                    type:
                      - integer
                      - 'null'
                    description: >-
                      Present for a computer that runs by the hour once its end
                      is set. What is held from your credits for the prepaid
                      run, in cents. `null` when `prepaid_until` is.
                  prepay_returned_cents:
                    type: integer
                    description: >-
                      Present when some of an earlier prepay came back to your
                      credits, in cents.
                  prepay_warning:
                    type: string
                    description: >-
                      Present when the end was set but its time was not prepaid:
                      `The new time is billed by the hour. Only the account
                      owner can prepay it, signed in or with a key that has
                      Billing write.` when you may not prepay, or `The new end
                      is set, and the time to it is billed by the hour: your
                      credit does not cover prepaying all of it.` when the
                      credit is short.
                  end_not_set:
                    type: object
                    description: >-
                      Present when the end you asked for was not set. The start
                      or resume itself succeeded. `code` is `INVALID_ENDS` (an
                      `ends_at` that passed meanwhile), `COMPUTER_BUSY`,
                      `insufficient_credit` (a later end than a running prepay
                      that the credit cannot cover, with `needed_cents`,
                      `available_cents`, and `keep_cents` when there is any),
                      `ENDS_UNAVAILABLE`, `NOT_FOUND`, `END_NOT_SET`, or, on a
                      resume still under way, `STILL_RESUMING`.
                    properties:
                      error:
                        type: string
                      code:
                        type: string
              examples:
                running:
                  summary: Running
                  value:
                    success: true
                    status: running
                with-end:
                  summary: Resumed with an end
                  value:
                    success: true
                    status: running
                    ends_at: '2026-04-07T14:35:04.000Z'
                    on_end: delete
                    ended_at: null
                    deletes_at: '2026-04-07T14:35:04.000Z'
        '202':
          description: >-
            Accepted: it is resuming from storage (`status: "resuming"`) or
            waking from storage (`waking: true`, with `expected_seconds`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                    enum:
                      - resuming
                  pending:
                    type: boolean
                  waking:
                    type: boolean
                  expected_seconds:
                    type: integer
                  ends_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Present when the body sent an end. When the computer ends.
                      `null` when it never ends.
                  on_end:
                    type:
                      - string
                      - 'null'
                    enum:
                      - delete
                      - stop
                      - null
                    description: >-
                      Present when the body sent an end. What happens at the
                      end, read only: `"delete"` (deleted at `ends_at`, as every
                      end set now is), `"stop"` (an end set before every end
                      deleted the computer: stopped at `ends_at`, deleted 7 days
                      later unless it is started), or `null` with no end.
                  ended_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Present when the body sent an end. When Orgo stopped the
                      computer because its time ran out, or marked it ended if
                      it was already off. `null` when it has not ended, and
                      after any change of the end.
                  deletes_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Present when the body sent an end. When Orgo deletes the
                      computer: `ends_at` once an end is set, or `null` with no
                      end. With `end_not_set`, the computer's current value.
                  end_not_set:
                    type: object
                    description: >-
                      Present when the end you asked for was not set. The start
                      or resume itself succeeded. `code` is `INVALID_ENDS` (an
                      `ends_at` that passed meanwhile), `COMPUTER_BUSY`,
                      `insufficient_credit` (a later end than a running prepay
                      that the credit cannot cover, with `needed_cents`,
                      `available_cents`, and `keep_cents` when there is any),
                      `ENDS_UNAVAILABLE`, `NOT_FOUND`, `END_NOT_SET`, or, on a
                      resume still under way, `STILL_RESUMING`.
                    properties:
                      error:
                        type: string
                      code:
                        type: string
              examples:
                resuming:
                  summary: Memory coming back from storage
                  value:
                    success: true
                    status: resuming
                    pending: true
                waking:
                  summary: Waking from storage
                  value:
                    success: true
                    pending: true
                    waking: true
                    expected_seconds: 90
                still-resuming:
                  summary: Asked for an end while still resuming
                  value:
                    success: true
                    status: resuming
                    pending: true
                    ends_at: null
                    ended_at: null
                    deletes_at: null
                    end_not_set:
                      error: >-
                        No end was set: it is still resuming. Set it once it is
                        running.
                      code: STILL_RESUMING
        '400':
          description: >-
            The body is not empty and is not a JSON object, an end breaks the
            rules of `PATCH /computers/{id}` (`INVALID_ENDS`, with the same
            messages, also for an `on_end` other than `"delete"` or one sent
            without an end), or an end is given to a computer that cannot have
            one (`ENDS_NOT_SUPPORTED`). Nothing resumes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                body:
                  summary: Bad body
                  value:
                    error: >-
                      Expected a JSON object with an optional ends_in_hours or
                      ends_at.
                invalid-ends:
                  summary: '`ends_in_hours` out of range'
                  value:
                    error: >-
                      ends_in_hours must be a whole number of hours from 1 to
                      720, or null for never.
                    code: INVALID_ENDS
                ends-not-supported:
                  summary: A computer that cannot have an end
                  value:
                    error: Only Linux and Windows computers can have an end.
                    code: ENDS_NOT_SUPPORTED
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: >-
            The owner's plan no longer funds running computers
            (`upgrade_required`), Free hours are used up (`bops_free_hours`), or
            an hourly computer has no credit left
            (`INSUFFICIENT_COMPUTE_CREDIT`).
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: >-
                  Your plan does not include running computers. Upgrade to
                  resume this computer.
                code: upgrade_required
        '403':
          description: >-
            Can chat access (`workspace_read_only`), or no access to the
            computer. A computer's own key, its identity token, and a key for
            one computer can resume the computer, but a body that names an end
            returns `computer_key` or `computer_scope`, and nothing resumes.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - workspace_read_only
                      - computer_key
                      - computer_scope
              examples:
                view-only:
                  summary: Can chat access
                  value:
                    error: >-
                      This workspace is view-only. Ask the owner for write
                      access (workspace_read_only).
                    code: workspace_read_only
                computer-key:
                  summary: The computer's own key named an end
                  value:
                    error: >-
                      A computer’s own key can’t set when a computer ends. Use
                      your account or the web UI.
                    code: computer_key
                computer-scope:
                  summary: A key for one computer named an end
                  value:
                    error: >-
                      A key for one computer can’t set when a computer ends. Use
                      a key for your account or the web UI.
                    code: computer_scope
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            The resume was refused: not `suspended`, a suspend still being saved
            (`suspend_in_progress`), being moved (`migrating`), or its saved
            memory can't be used (`suspend_state_missing`, `disk_changed`). Orgo
            is deleting the computer because its time ran out
            (`COMPUTER_END_DELETING`).
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
              examples:
                not-suspended:
                  summary: Not suspended
                  value:
                    error: 'Computer is not suspended (status: stopped)'
                saving:
                  summary: Suspend still being saved
                  value:
                    error: >-
                      This computer is still being saved to storage. Try again
                      once it shows Suspended.
                    code: suspend_in_progress
                end-deleting:
                  summary: Being deleted for its end
                  value:
                    error: This computer is being deleted because its time ran out.
                    code: COMPUTER_END_DELETING
        '429':
          description: >-
            The workspace owner's plan rate limit for starts, stops and other
            changes, for the account or for this computer: `code` is
            `rate_limited`, with `limit` and `retry_after`, and a `Retry-After`
            header. Nothing resumes.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - rate_limited
                  limit:
                    type: string
                    description: >-
                      The limit that was reached:
                      `computer_lifecycle_per_minute` (the account) or
                      `computer_lifecycle_per_computer_per_minute` (this
                      computer).
                  retry_after:
                    type: integer
                    description: Seconds until a retry can succeed.
              example:
                error: >-
                  Too many starts, stops and other changes to this computer this
                  minute (10 a minute). Try again in 20 seconds.
                code: rate_limited
                limit: computer_lifecycle_per_computer_per_minute
                retry_after: 20
        '500':
          description: The resume failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Failed to resume
        '503':
          description: >-
            Try again shortly: the saved memory can't be reached
            (`suspend_state_unavailable`), the host has no room yet
            (`insufficient_disk`), a wake from storage failed (`wake_failed`,
            `no_capacity`, `saved_state_unavailable`, with `retry_after`), an
            hourly computer's running time could not be reserved
            (`HOURLY_FUNDING_UNAVAILABLE`, `HOURLY_WORKER_UNAVAILABLE`, or
            `FREE_HOURLY_BUSY`), or no host is on record. Carries `Retry-After`
            where it says when. An end, or `on_end`, where ends are not set up
            yet returns `ENDS_UNAVAILABLE` with `retryable: true`, and nothing
            resumes.
          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
                  retry_after:
                    type: integer
                  retryable:
                    type: boolean
              examples:
                no-capacity:
                  summary: No room to wake it
                  value:
                    error: >-
                      There's no room to wake this computer right now. Try again
                      in a few minutes.
                    code: no_capacity
                    retry_after: 30
                ends-unavailable:
                  summary: Ends not set up yet
                  value:
                    error: >-
                      Ends aren’t set up on this server yet. Try again later, or
                      leave the end out.
                    code: ENDS_UNAVAILABLE
                    retryable: true
components:
  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.
  responses:
    Unauthorized:
      description: 'No usable credential. Send `Authorization: Bearer $ORGO_API_KEY`.'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  docs:
                    type: string
                    format: uri
                    description: 'How to sign in: `https://www.orgo.ai/auth.md`.'
          examples:
            invalid-key:
              summary: The key is not one of yours
              value:
                error: Invalid API key
                docs: https://www.orgo.ai/auth.md
            no-credential:
              summary: No key and no session
              value:
                error: Authentication required
                docs: https://www.orgo.ai/auth.md
      headers:
        WWW-Authenticate:
          description: '`Bearer realm="Orgo API"`.'
          schema:
            type: string
    NotFound:
      description: >-
        No computer with this id on your account. With an API key the body
        carries `code: "computer_not_found"`; signed in with a session it is
        `Desktop not found`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            api-key:
              summary: API key
              value:
                error: Computer not found (computer_not_found).
                code: computer_not_found
            session:
              summary: Signed in with a session
              value:
                error: Desktop not found
  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.