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

# Heal a computer

> Try to recover a computer that is not answering, or restart it when you ask. Says what it did and what to do next.

Tries to recover a computer that is not answering, then checks it again. By default it never restarts the computer. If the computer is still not healthy, `recommendation` says what to do next. Send `{"action": "restart"}` to restart it.

To look without changing anything, call [Check computer health](https://docs.orgo.ai/api-reference/computers/health.md).

## Path parameters

**id** `string` *required*

Computer ID (UUID). An `instance_id` is not accepted here.

## Body parameters

**action** `string` (default: auto)

`auto` tries automatic recovery and respects a computer you paused. `restart` restarts the computer, then waits up to about 45 seconds for it to answer. Any other value reads as `auto`. The body is optional.

## Example

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

## Response

**computer\_id** `string`

The computer UUID.

**action** `string`

`auto` or `restart`.

**healed** `boolean`

`true` when the computer is healthy after the call.

**steps** `object[]`

What was done, in order, each with `step` and `detail`.

**health** `object`

The checks after the call, as [Check computer health](https://docs.orgo.ai/api-reference/computers/health.md) returns them.

**recommendation** `string`

What to do next. Present when `action` is `auto` and `healed` is `false`, for example to resume a paused computer or to call this endpoint again with `{"action": "restart"}`.

**code** `string`

Present when a wake from storage did not finish. `computer_waking` means it is still waking, so check again in a minute. Any other value is the reason it failed.

**retry\_after** `number`

Seconds to wait before you ask again, when there is a time to give.

```json theme={null}
{
  "computer_id": "a3bb189e-8bf9-3888-9912-ace4e6543002",
  "action": "restart",
  "healed": true,
  "steps": [
    { "step": "restart", "detail": "The computer was restarted." }
  ],
  "health": { "computer_id": "a3bb189e-8bf9-3888-9912-ace4e6543002", "overall": "healthy", "checks": ["…"] }
}
```

## Errors

| Status | Body | When |
| - | - | - |
| `400` | `{ "error": "This computer has no instance to restart." }` | `action` is `restart` and the computer is stopped. Call [Start](https://docs.orgo.ai/api-reference/computers/start.md). |
| `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": "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. |
| `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. |
| `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": "This computer is paused. Resume it first, then restart it.", "code": "suspended" }` | `action` is `restart` and the computer is `suspended`. |
| `409` | `{ "error": "…", "code": "RESTART_CLEARS_DISK" }` | `action` is `restart` on a dedicated GPU computer. Its restart deletes everything outside `/workspace`, so only [Restart computer](https://docs.orgo.ai/api-reference/computers/restart.md) can do it, with `"clear_disk": true`. |
| `429` | `{ "error": "…", "code": "rate_limited", "limit": "…", "retry_after": 20 }` | The plan rate limit for starts, stops and other changes, as described in [Plan rate limits](https://docs.orgo.ai/guides/account-limits.md#plan-rate-limits). |
| `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`. Retry. |


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