{"openapi":"3.1.0","info":{"title":"raw.computer API","version":"2026-11-08","summary":"Full VMs for AI agents, CI and developers.","description":"The control plane of raw.computer. Authenticate with `Authorization: Bearer rc_live_…` (a workspace API key) or `rc_pat_…` (the raw CLI's personal token, from the device flow under Sign-in), and name the workspace a personal token acts in with `Raw-Workspace`. Send `Raw-Version` to choose a version (2026-11-08); without it, the version the key is pinned to. Every POST of a key takes an `Idempotency-Key`. Every error has one shape (`Error`), naming its next step."},"servers":[{"url":"https://raw.computer"}],"security":[{"apiKey":[]}],"tags":[{"name":"Account"},{"name":"Workspaces"},{"name":"Members"},{"name":"API keys"},{"name":"Usage"},{"name":"Wallet"},{"name":"Sandboxes"},{"name":"Snapshots"},{"name":"Templates"},{"name":"Sign-in"},{"name":"Invitations"}],"paths":{"/v1/me":{"get":{"operationId":"getMe","tags":["Account"],"summary":"Who this key is","description":"The key or token, its person, the workspace this request acts in and its org, and the API version this request was answered in. A personal token acts in the workspace Raw-Workspace names, and in none without it.","parameters":[{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces":{"get":{"operationId":"listWorkspaces","tags":["Workspaces"],"summary":"List workspaces","description":"The workspaces this key acts in: a workspace key's one workspace; every workspace of a personal token's person, with their relation in each.","parameters":[{"$ref":"#/components/parameters/RawVersion"}],"responses":{"200":{"description":"The workspaces.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{id}":{"get":{"operationId":"getWorkspace","tags":["Workspaces"],"summary":"Get a workspace","parameters":[{"name":"id","in":"path","required":true,"description":"The workspace, ws_…","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"}],"responses":{"200":{"description":"The workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"updateWorkspace","tags":["Workspaces"],"summary":"Rename a workspace or set its residency","description":"Its name (its code stays), where its sandboxes may live (residency: any, eu, or null for the org's default), or both. An admin of the workspace: a personal token of an admin or of an org owner. A workspace key is never an admin (403).","parameters":[{"name":"id","in":"path","required":true,"description":"The workspace, ws_…","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceUpdate"}}}},"responses":{"200":{"description":"The workspace, changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error: idempotency_conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{id}/budget":{"get":{"operationId":"getWorkspaceBudget","tags":["Workspaces"],"summary":"What a workspace may spend","description":"Its cap, its usage this month, what is held, what is left, and can_start: whether a new sandbox could be paid now. Readable by any key of the workspace; the org's balance is never in it.","parameters":[{"name":"id","in":"path","required":true,"description":"The workspace, ws_…","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"}],"responses":{"200":{"description":"The budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Budget"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/members":{"get":{"operationId":"listMembers","tags":["Members"],"summary":"List members","description":"The members of the workspace the request acts in: the people granted a relation there (via grant) and the org's owners, who administer every workspace of the org without a grant (relation admin, via org_owner). Each person once.","parameters":[{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The members.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api_keys":{"get":{"operationId":"listApiKeys","tags":["API keys"],"summary":"List API keys","description":"The keys of the workspace the request acts in that its person made (every one, for an admin). Never a secret, and never a personal token.","parameters":[{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The keys.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createApiKey","tags":["API keys"],"summary":"Create an API key","description":"A key of the same person in the workspace the request acts in, at most as strong as the caller there (a developer makes developer or viewer keys; a viewer makes none). The secret is in this answer only.","parameters":[{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"201":{"description":"The key, with its secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error: idempotency_conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api_keys/{id}":{"delete":{"operationId":"revokeApiKey","tags":["API keys"],"summary":"Revoke an API key or token","description":"Requests with the key fail from now on. A key may revoke itself, and so may a personal token (raw logout).","parameters":[{"name":"id","in":"path","required":true,"description":"The key or token, key_…","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"}],"responses":{"200":{"description":"The key is gone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"operationId":"listUsage","tags":["Usage"],"summary":"Usage by day","description":"The usage of the workspace the request acts in, per UTC day, class and size, between two days (inclusive, at most 366 apart; the last 30 days by default).","parameters":[{"name":"from","in":"query","required":false,"description":"The first UTC day, YYYY-MM-DD.","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"The last UTC day, YYYY-MM-DD.","schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The days.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageDay"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/wallet":{"get":{"operationId":"getWallet","tags":["Wallet"],"summary":"The org's wallet","description":"The balance and ledger entries, newest first, of the org of the workspace the request acts in. Read only, and only while the caller's person holds billing or owner on the org; any key reads its workspace's budget instead (GET /v1/workspaces/{id}/budget).","parameters":[{"name":"limit","in":"query","required":false,"description":"Entries per page, 1 to 100 (20).","schema":{"type":"string"}},{"name":"starting_after","in":"query","required":false,"description":"An entry id, ent_…: the page after it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The wallet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sandboxes":{"get":{"operationId":"listSandboxes","tags":["Sandboxes"],"summary":"List sandboxes","description":"The sandboxes of the workspace the request acts in that are not deleted, newest first, from the directory the cells write.","parameters":[{"name":"limit","in":"query","required":false,"description":"Sandboxes per page, 1 to 200 (50).","schema":{"type":"string"}},{"name":"starting_after","in":"query","required":false,"description":"A sandbox id, sbx_…: the page after it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The sandboxes.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Sandbox"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createSandbox","tags":["Sandboxes"],"summary":"Create a sandbox","description":"Starts a full VM of a class and size in the workspace the request acts in, from a template when one is named (one the workspace may not start from: 404). When no cell serves the class and the workspace's region (early access, today): 503 capacity_unavailable, whatever on_full says, with no Retry-After. When cells serve it but are full: 202 with the sandbox queued and its queue position and ETA, or with on_full \"fail\", 503 capacity_full with Retry-After. A start the wallet or a cap cannot pay for: 402 insufficient_funds.","parameters":[{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxCreate"}}}},"responses":{"201":{"description":"The sandbox, starting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"202":{"description":"The sandbox, queued: its queue position and ETA.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Error: insufficient_funds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error: idempotency_conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error: capacity_unavailable. Or capacity_full.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sandboxes/{id}":{"get":{"operationId":"getSandbox","tags":["Sandboxes"],"summary":"Get a sandbox","description":"A sandbox of the workspace the request acts in, as the directory the cells write holds it: its class, size, name and the state its cell last reported. An id of another form, of another workspace, or of a deleted sandbox: 404 not_found.","parameters":[{"name":"id","in":"path","required":true,"description":"The sandbox, sbx_<cell>_<26 characters>, as GET /v1/sandboxes lists it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The sandbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteSandbox","tags":["Sandboxes"],"summary":"Delete a sandbox","description":"Deletes the machine and its disk (its snapshots stay until they expire). A developer key. Done by its cell: while no cell takes requests through the API (early access), a sandbox the directory holds is answered 503 capacity_unavailable; an id it does not hold, 404 not_found.","parameters":[{"name":"id","in":"path","required":true,"description":"The sandbox, sbx_<cell>_<26 characters>, as GET /v1/sandboxes lists it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The sandbox is gone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error: capacity_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sandboxes/{id}/stop":{"post":{"operationId":"stopSandbox","tags":["Sandboxes"],"summary":"Stop a sandbox","description":"Stops the machine and keeps its disk (billed as storage while stopped). A developer key. Done by its cell: while no cell takes requests through the API (early access), 503 capacity_unavailable for a sandbox the directory holds; 404 not_found for an id it does not.","parameters":[{"name":"id","in":"path","required":true,"description":"The sandbox, sbx_<cell>_<26 characters>, as GET /v1/sandboxes lists it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"202":{"description":"The sandbox, stopping.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error: idempotency_conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error: capacity_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sandboxes/{id}/start":{"post":{"operationId":"startSandbox","tags":["Sandboxes"],"summary":"Start a stopped sandbox","description":"Starts a stopped machine from its disk. A developer key. Paid and placed like a new sandbox: 402 insufficient_funds when the wallet or a cap cannot pay; when its cell is full, queued (202) or, with on_full \"fail\", 503 capacity_full. While no cell takes requests through the API (early access), 503 capacity_unavailable for a sandbox the directory holds; 404 not_found for an id it does not.","parameters":[{"name":"id","in":"path","required":true,"description":"The sandbox, sbx_<cell>_<26 characters>, as GET /v1/sandboxes lists it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"202":{"description":"The sandbox, starting or queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Error: insufficient_funds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error: idempotency_conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error: capacity_unavailable. Or capacity_full.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sandboxes/{id}/fork":{"post":{"operationId":"forkSandbox","tags":["Sandboxes"],"summary":"Fork a sandbox","description":"A new sandbox in the same workspace from this one's disk and memory at this moment, on the same cell. A developer key. Paid and placed like a new sandbox (402 insufficient_funds; queued, or 503 capacity_full with on_full \"fail\"). While no cell takes requests through the API (early access), 503 capacity_unavailable for a sandbox the directory holds; 404 not_found for an id it does not.","parameters":[{"name":"id","in":"path","required":true,"description":"The sandbox, sbx_<cell>_<26 characters>, as GET /v1/sandboxes lists it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxFork"}}}},"responses":{"201":{"description":"The new sandbox, starting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"202":{"description":"The new sandbox, queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Error: insufficient_funds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error: idempotency_conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error: capacity_unavailable. Or capacity_full.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/snapshots":{"get":{"operationId":"listSnapshots","tags":["Snapshots"],"summary":"List snapshots","description":"The snapshots of the workspace the request acts in that are not deleted, newest first, from the directory the cells write; with sandbox, only that sandbox's (a deleted sandbox's too: snapshots outlive it).","parameters":[{"name":"sandbox","in":"query","required":false,"description":"A sandbox id, sbx_…: only the snapshots taken of it.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Snapshots per page, 1 to 200 (50).","schema":{"type":"string"}},{"name":"starting_after","in":"query","required":false,"description":"A snapshot id, snp_…: the page after it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The snapshots.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Snapshot"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createSnapshot","tags":["Snapshots"],"summary":"Snapshot a sandbox","description":"Takes a snapshot of a sandbox of the workspace the request acts in: its disk, and for a running sandbox its memory. A developer key. Done by the sandbox's cell: while no cell takes requests through the API (early access), 503 capacity_unavailable for a sandbox the directory holds; 404 not_found for an id it does not.","parameters":[{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotCreate"}}}},"responses":{"202":{"description":"The snapshot, being taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error: idempotency_conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error: capacity_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/snapshots/{id}":{"get":{"operationId":"getSnapshot","tags":["Snapshots"],"summary":"Get a snapshot","description":"A snapshot of the workspace the request acts in, as the directory the cells write holds it. An id of another form, of another workspace, or of a deleted snapshot: 404 not_found.","parameters":[{"name":"id","in":"path","required":true,"description":"The snapshot, snp_…, as GET /v1/snapshots lists it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteSnapshot","tags":["Snapshots"],"summary":"Delete a snapshot","description":"Deletes a snapshot, freeing its unique bytes. A developer key. Done by the cell that holds it: while no cell takes requests through the API (early access), 503 capacity_unavailable for a snapshot the directory holds; 404 not_found for an id it does not.","parameters":[{"name":"id","in":"path","required":true,"description":"The snapshot, snp_…, as GET /v1/snapshots lists it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The snapshot is gone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error: capacity_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates":{"get":{"operationId":"listTemplates","tags":["Templates"],"summary":"List templates","description":"The templates the workspace the request acts in may start sandboxes from: its own and raw.computer's public ones (workspace null), by name, from the directory the cells write. One page: has_more is false.","parameters":[{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The templates.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Template"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates/{id}":{"get":{"operationId":"getTemplate","tags":["Templates"],"summary":"Get a template","description":"A template the workspace the request acts in may start from: its own, or one of raw.computer's public ones. Another workspace's, or an id of another form: 404 not_found.","parameters":[{"name":"id","in":"path","required":true,"description":"The template, tpl_…, as GET /v1/templates lists it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/device/code":{"post":{"operationId":"createDeviceCode","tags":["Sign-in"],"summary":"Start a sign-in (device flow)","description":"How the raw CLI signs in (RFC 8628), with no key yet. Show the person user_code and open verification_uri_complete; once they approve it in the console, POST /v1/device/token with device_code answers a personal token. The code lives ten minutes; poll no faster than every interval seconds.","security":[],"parameters":[{"$ref":"#/components/parameters/RawVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCodeCreate"}}}},"responses":{"201":{"description":"The sign-in, waiting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCode"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/device/token":{"post":{"operationId":"createDeviceToken","tags":["Sign-in"],"summary":"Poll a sign-in for its token","description":"While nobody has decided: 400 authorization_pending (poll again after interval seconds). Refused: 400 access_denied. Unknown, past its ten minutes or used: 400 expired_token. Approved: 201 with the personal token, once; the code is spent.","security":[],"parameters":[{"$ref":"#/components/parameters/RawVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTokenRequest"}}}},"responses":{"201":{"description":"The personal token, once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalToken"}}}},"400":{"description":"Error: invalid_request. Or authorization_pending. Or access_denied. Or expired_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/members/{id}":{"post":{"operationId":"updateMember","tags":["Members"],"summary":"Change a member's relation","description":"Makes the member's one relation in the workspace the request acts in the one given (viewer, developer, admin). An admin: a personal token of an admin or of an org owner; a workspace key is never one (403). An owner of the org is refused (403): ownership is changed by an owner in the console.","parameters":[{"name":"id","in":"path","required":true,"description":"The person, usr_…, as GET /v1/members lists them.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberUpdate"}}}},"responses":{"200":{"description":"The member, changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error: idempotency_conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"removeMember","tags":["Members"],"summary":"Remove a member","description":"Ends every grant of the person in the workspace the request acts in; their keys of it stop working. An admin: a personal token of an admin or of an org owner; a workspace key is never one (403). An owner of the org is refused (403): they administer every workspace of it, and only an owner changes that, in the console.","parameters":[{"name":"id","in":"path","required":true,"description":"The person, usr_…, as GET /v1/members lists them.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The member is gone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invitations":{"get":{"operationId":"listInvitations","tags":["Invitations"],"summary":"List pending invitations","description":"The invitations of the workspace the request acts in that nobody accepted yet, oldest first, past their expiry included until withdrawn. An admin: a personal token of an admin or of an org owner; a workspace key is never one (403).","parameters":[{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The invitations.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createInvitation","tags":["Invitations"],"summary":"Invite a person by email","description":"Mails an invitation to the workspace the request acts in, with the relation it grants once accepted (developer by default). The link lives seven days; the person accepts it signed in to the console, as themselves. An admin: a personal token of an admin or of an org owner; a workspace key is never one (403). A workspace sends at most 10 invitations in 60 seconds, from the console and the API together (429 rate_limited).","parameters":[{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreate"}}}},"responses":{"201":{"description":"The invitation, mailed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error: idempotency_conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invitations/{id}":{"delete":{"operationId":"withdrawInvitation","tags":["Invitations"],"summary":"Withdraw an invitation","description":"Its link stops working. Only one nobody accepted yet, of the workspace the request acts in; any other id is 404. An admin: a personal token of an admin or of an org owner; a workspace key is never one (403).","parameters":[{"name":"id","in":"path","required":true,"description":"The invitation, inv_…, as GET /v1/invitations lists it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RawVersion"},{"$ref":"#/components/parameters/RawWorkspace"}],"responses":{"200":{"description":"The invitation is gone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"400":{"description":"Error: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error: forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error: rate_limited.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Any other error, in the one shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"enum":["capacity_unavailable","capacity_full","unauthorized","forbidden","not_found","invalid_request","idempotency_conflict","rate_limited","insufficient_funds","internal_error","authorization_pending","access_denied","expired_token"],"type":"string","description":"Stable: branch on it, never on message."},"message":{"type":"string","description":"What happened, in one sentence."},"next_step":{"$ref":"#/components/schemas/NextStep"},"retry_at":{"type":"string","format":"date-time","description":"When a retry is expected to succeed (RFC 3339), with the Retry-After header: on capacity_full and rate_limited."},"docs":{"type":"string","format":"uri","description":"The code on the Errors page: https://raw.computer/docs/errors#<code>."}},"required":["code","message","next_step","docs"]}},"required":["error"],"description":"Every error has this shape."},"NextStep":{"type":"object","properties":{"message":{"type":"string","description":"One plain sentence a person or a model can act on."},"url":{"type":"string","format":"uri","description":"A page that helps."},"api":{"type":"string","description":"An API call that helps, as \"METHOD /v1/path\"."},"cli":{"type":"string","description":"A raw CLI command that helps, such as \"raw login\"."}},"required":["message"],"description":"What to do next."},"Org":{"type":"object","properties":{"object":{"const":"org"},"id":{"type":"string","pattern":"^org_","description":"The org id, prefixed org_."},"name":{"type":"string"}},"required":["object","id","name"]},"Workspace":{"type":"object","properties":{"object":{"const":"workspace"},"id":{"type":"string","pattern":"^ws_","description":"The workspace id, prefixed ws_."},"code":{"type":"string","description":"Unique in its org; names it in URLs and the CLI."},"name":{"type":"string"},"org":{"$ref":"#/components/schemas/Org"},"relation":{"enum":["viewer","developer","admin"],"type":"string","description":"The highest relation the caller holds here."},"residency":{"anyOf":[{"enum":["any","eu"],"type":"string"},{"type":"null"}],"description":"Where its sandboxes may live, as set for this workspace: any (no promise) or eu (cells of the eu region only). null: it follows its org's default."}},"required":["object","id","code","name","org","relation","residency"]},"User":{"type":"object","properties":{"object":{"const":"user"},"id":{"type":"string","pattern":"^usr_","description":"The person id, prefixed usr_."},"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["object","id","name","email"]},"Me":{"type":"object","properties":{"object":{"const":"me"},"user":{"$ref":"#/components/schemas/User"},"api_key":{"type":"object","properties":{"object":{"const":"api_key"},"id":{"type":"string","pattern":"^key_","description":"The key or token id, prefixed key_."},"name":{"type":"string"},"kind":{"enum":["workspace","personal"],"type":"string","description":"workspace: an API key of one workspace (rc_live_…). personal: the raw CLI's token (rc_pat_…, from the device flow), which acts as its person in whichever of their workspaces a request names with Raw-Workspace, never above that person's relation there and never at org level."},"relation":{"anyOf":[{"enum":["viewer","developer"],"type":"string","description":"What a key may do in its workspace: viewer reads, developer also writes. Never admin."},{"type":"null"}],"description":"A workspace key's own relation; null for a personal token, which acts with its person's relation in each workspace (workspace.relation)."}},"required":["object","id","name","kind","relation"]},"workspace":{"anyOf":[{"$ref":"#/components/schemas/Workspace"},{"type":"null"}],"description":"The workspace this request acts in: a workspace key's own, or the one a personal token named with Raw-Workspace; null when a personal token named none."},"raw_version":{"type":"string","description":"The API version this request was answered in."}},"required":["object","user","api_key","workspace","raw_version"]},"Member":{"type":"object","properties":{"object":{"const":"member"},"user":{"$ref":"#/components/schemas/User"},"relation":{"enum":["viewer","developer","admin"],"type":"string","description":"A relation in a workspace: admin ⊇ developer ⊇ viewer."},"via":{"enum":["grant","org_owner"],"type":"string","description":"grant: the person was granted the relation in this workspace. org_owner: an owner of the workspace's org, who administers every workspace of it (relation admin) without a grant."},"since":{"type":"string","format":"date-time","description":"When the person was granted the relation, or became an owner of the org."}},"required":["object","user","relation","via","since"]},"ApiKey":{"type":"object","properties":{"object":{"const":"api_key"},"id":{"type":"string","pattern":"^key_","description":"The key id, prefixed key_."},"name":{"type":"string"},"start":{"type":"string","description":"The first characters of the secret, to tell keys apart."},"relation":{"enum":["viewer","developer"],"type":"string","description":"What a key may do in its workspace: viewer reads, developer also writes. Never admin."},"user":{"$ref":"#/components/schemas/User"},"created_at":{"type":"string","format":"date-time","description":"When the key was made."},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the key last called the API, to the minute (RFC 3339); null when it never has."}},"required":["object","id","name","start","relation","user","created_at","last_used_at"]},"ApiKeyCreated":{"type":"object","properties":{"object":{"const":"api_key"},"id":{"type":"string","pattern":"^key_","description":"The key id, prefixed key_."},"name":{"type":"string"},"start":{"type":"string","description":"The first characters of the secret, to tell keys apart."},"relation":{"enum":["viewer","developer"],"type":"string","description":"What a key may do in its workspace: viewer reads, developer also writes. Never admin."},"user":{"$ref":"#/components/schemas/User"},"created_at":{"type":"string","format":"date-time","description":"When the key was made."},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the key last called the API, to the minute (RFC 3339); null when it never has."},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The secret, rc_live_…, shown in this answer only; only its hash is kept. null in an idempotent replay."}},"required":["object","id","name","start","relation","user","created_at","last_used_at","secret"]},"ApiKeyCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"A name to tell the key apart."},"relation":{"enum":["viewer","developer"],"type":"string","description":"What a key may do in its workspace: viewer reads, developer also writes. Never admin.","default":"developer"}},"required":["name"]},"Deleted":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"deleted":{"const":true}},"required":["object","id","deleted"]},"UsageDay":{"type":"object","properties":{"object":{"const":"usage_day"},"day":{"type":"string","format":"date","description":"A UTC day."},"class":{"type":"string"},"size":{"type":"string"},"vm_seconds":{"type":"integer","minimum":0,"description":"Seconds of machines running: a whole number."},"vcpu_seconds":{"type":"integer","minimum":0,"description":"vCPUs × seconds: a whole number."},"memory_mib_seconds":{"type":"integer","minimum":0,"description":"MiB of memory × seconds: a whole number."},"disk_gib_seconds":{"type":"integer","minimum":0,"description":"GiB of disk × seconds: a whole number."},"egress_bytes":{"type":"integer","minimum":0,"description":"Bytes sent out: a whole number."},"ipv4_seconds":{"type":"integer","minimum":0,"description":"Public IPv4 addresses × seconds: a whole number."}},"required":["object","day","class","size","vm_seconds","vcpu_seconds","memory_mib_seconds","disk_gib_seconds","egress_bytes","ipv4_seconds"]},"WalletEntry":{"type":"object","properties":{"object":{"const":"ledger_entry"},"id":{"type":"string","pattern":"^ent_","description":"The entry id, prefixed ent_."},"workspace":{"anyOf":[{"type":"string","pattern":"^ws_","description":"The workspace whose usage or allowance it is; null for an org-level entry id, prefixed ws_."},{"type":"null"}]},"account":{"enum":["wallet","escrow"],"type":"string"},"kind":{"type":"string"},"amount_usd_micros":{"type":"integer","description":"Signed: + into the account, - out of it, in micro-dollars (1 USD = 1,000,000)."},"created_at":{"type":"string","format":"date-time","description":"When it was posted."}},"required":["object","id","workspace","account","kind","amount_usd_micros","created_at"]},"Wallet":{"type":"object","properties":{"object":{"const":"wallet"},"org":{"$ref":"#/components/schemas/Org"},"balance_usd_micros":{"type":"integer","description":"What the wallet holds, in micro-dollars (1 USD = 1,000,000)."},"held_usd_micros":{"type":"integer","description":"What live allowances hold for running machines, in micro-dollars (1 USD = 1,000,000)."},"entries":{"type":"array","items":{"$ref":"#/components/schemas/WalletEntry"}},"has_more":{"type":"boolean"}},"required":["object","org","balance_usd_micros","held_usd_micros","entries","has_more"]},"Budget":{"type":"object","properties":{"object":{"const":"budget"},"workspace":{"type":"string","pattern":"^ws_","description":"The workspace id, prefixed ws_."},"monthly_cap_usd_micros":{"anyOf":[{"type":"integer","description":"The workspace's own monthly cap; null when it has none (the org's may still hold), in micro-dollars (1 USD = 1,000,000)."},{"type":"null"}]},"spent_usd_micros":{"type":"integer","description":"Usage charged this calendar month (UTC), in micro-dollars (1 USD = 1,000,000)."},"held_usd_micros":{"type":"integer","description":"What its live allowances hold, in micro-dollars (1 USD = 1,000,000)."},"remaining_usd_micros":{"anyOf":[{"type":"integer","description":"What is left under its cap; null when it has no cap, in micro-dollars (1 USD = 1,000,000)."},{"type":"null"}]},"can_start":{"type":"boolean","description":"Whether the org's wallet and the caps leave room for a new allowance now. false answers a start with insufficient_funds."}},"required":["object","workspace","monthly_cap_usd_micros","spent_usd_micros","held_usd_micros","remaining_usd_micros","can_start"]},"Sandbox":{"type":"object","properties":{"object":{"const":"sandbox"},"id":{"type":"string","pattern":"^sbx_","description":"The sandbox (it encodes its cell) id, prefixed sbx_."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"class":{"type":"string"},"size":{"type":"string"},"state":{"type":"string","description":"As its cell last reported it; unknown when it has not reported yet."},"created_at":{"type":"string","format":"date-time","description":"When its cell made it."},"queue":{"type":"object","properties":{"position":{"type":"integer","minimum":1},"eta":{"type":"string","format":"date-time","description":"When the start is expected."}},"required":["position","eta"]}},"required":["object","id","name","class","size","state","created_at"]},"SandboxCreate":{"type":"object","properties":{"class":{"enum":["std","perf"],"type":"string","description":"std: agents and dev boxes; perf: CI."},"size":{"type":"string","pattern":"^[0-9]+x[0-9]+$","description":"vCPU x GiB, one the class sells (https://raw.computer/docs/limits#sizes); another answers 400 naming the sizes the class sells."},"name":{"type":"string","minLength":1,"maxLength":200},"template":{"type":"string","pattern":"^tpl_","description":"A template to start from, tpl_… as GET /v1/templates lists it: the workspace's own or one of ours. One the workspace may not start from answers 404."},"on_full":{"enum":["queue","fail"],"type":"string","description":"When cells are full: queue (the default, 202 queued) or fail (503 capacity_full).","default":"queue"}},"required":["class","size"]},"SandboxFork":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"on_full":{"enum":["queue","fail"],"type":"string","description":"When cells are full: queue (the default, 202 queued) or fail (503 capacity_full).","default":"queue"}},"required":[]},"Snapshot":{"type":"object","properties":{"object":{"const":"snapshot"},"id":{"type":"string","pattern":"^snp_","description":"The snapshot id, prefixed snp_."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"sandbox":{"type":"string","pattern":"^sbx_","description":"Its sandbox (which may be deleted since: a snapshot outlives it) id, prefixed sbx_."},"unique_size_bytes":{"type":"integer","minimum":0,"description":"Bytes only this snapshot holds, what deleting it frees and what its storage is billed on: a whole number."},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When its cell will delete it; null when it is kept until someone deletes it."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"When it was taken."}},"required":["object","id","name","sandbox","unique_size_bytes","expires_at","created_at"],"description":"A sandbox's disk, and for a running sandbox its memory, at a moment, as the cell that holds it reports it."},"SnapshotCreate":{"type":"object","properties":{"sandbox":{"type":"string","pattern":"^sbx_","description":"The sandbox to snapshot, sbx_… as GET /v1/sandboxes lists it."},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["sandbox"]},"Template":{"type":"object","properties":{"object":{"const":"template"},"id":{"type":"string","pattern":"^tpl_","description":"The template id, prefixed tpl_."},"name":{"type":"string"},"workspace":{"anyOf":[{"type":"string","pattern":"^ws_","description":"Its workspace (null: one of raw.computer's public templates, which every workspace may start from) id, prefixed ws_."},{"type":"null"}]},"cpu_baseline":{"type":"string","description":"The CPU baseline its memory image was made on, such as zen5-v1: it starts on hosts of that baseline."},"created_at":{"type":"string","format":"date-time","description":"When it was built."}},"required":["object","id","name","workspace","cpu_baseline","created_at"],"description":"A disk and memory image to start sandboxes from, as the cells that hold it report it."},"DeviceCodeCreate":{"type":"object","properties":{"client_name":{"type":"string","minLength":1,"maxLength":100,"description":"What asks, as the person approving it will read it (\"raw CLI on build-7\"); it names the token too."}},"required":[]},"DeviceCode":{"type":"object","properties":{"object":{"const":"device_code"},"device_code":{"type":"string","description":"The secret to poll POST /v1/device/token with. Keep it to yourself."},"user_code":{"type":"string","description":"What the person confirms on the verification page, such as WDJB-MJHT."},"verification_uri":{"type":"string","format":"uri","description":"The console page where a signed-in person approves a code."},"verification_uri_complete":{"type":"string","format":"uri","description":"The same page with the code filled in: open this one."},"expires_in":{"type":"integer","description":"Seconds until the code expires (ten minutes)."},"interval":{"type":"integer","description":"Seconds to wait between two polls."}},"required":["object","device_code","user_code","verification_uri","verification_uri_complete","expires_in","interval"],"description":"A sign-in waiting for its person (RFC 8628 device authorization response)."},"DeviceTokenRequest":{"type":"object","properties":{"device_code":{"type":"string","minLength":1,"maxLength":200,"description":"The device_code of POST /v1/device/code."}},"required":["device_code"]},"PersonalToken":{"type":"object","properties":{"object":{"const":"personal_token"},"id":{"type":"string","pattern":"^key_","description":"The token id, prefixed key_."},"name":{"type":"string"},"start":{"type":"string","description":"The first characters of the secret, to tell tokens apart."},"secret":{"type":"string","description":"The token, rc_pat_…, in this answer only. Send it as Authorization: Bearer, with Raw-Workspace naming the workspace to act in."},"user":{"$ref":"#/components/schemas/User"},"created_at":{"type":"string","format":"date-time","description":"When the token was made."}},"required":["object","id","name","start","secret","user","created_at"],"description":"The raw CLI's token: it acts as its person in their workspaces. Revoke it with DELETE /v1/api_keys/{id}."},"Invitation":{"type":"object","properties":{"object":{"const":"invitation"},"id":{"type":"string","pattern":"^inv_","description":"The invitation id, prefixed inv_."},"email":{"type":"string","format":"email","description":"The address it was mailed to, lower case."},"relation":{"enum":["viewer","developer","admin"],"type":"string","description":"What the person holds in the workspace once they accept."},"created_at":{"type":"string","format":"date-time","description":"When it was sent."},"expires_at":{"type":"string","format":"date-time","description":"When its link stops working (seven days after it was sent); a pending invitation past it is listed until withdrawn."}},"required":["object","id","email","relation","created_at","expires_at"]},"InvitationCreate":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":254,"description":"The address to mail the invitation to."},"relation":{"enum":["viewer","developer","admin"],"type":"string","description":"What the person will hold in the workspace (developer).","default":"developer"}},"required":["email"]},"MemberUpdate":{"type":"object","properties":{"relation":{"enum":["viewer","developer","admin"],"type":"string","description":"The member's one relation in the workspace from now on: every other grant of theirs here ends."}},"required":["relation"]},"WorkspaceUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Its new name, 1 to 100 characters. Its code stays."},"residency":{"anyOf":[{"enum":["any","eu"],"type":"string"},{"type":"null"}],"description":"Where its sandboxes may live: any, eu, or null to follow the org's default."}},"required":[],"description":"What to change; a field left out stays as it is."}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"rc_live_… or rc_pat_…","description":"A workspace API key from the console (rc_live_…), or the raw CLI's personal token (rc_pat_…) from the device flow."}},"headers":{"RetryAfter":{"description":"Seconds to wait before retrying; error.retry_at is the same moment as a time (RFC 3339).","schema":{"type":"integer","minimum":1}}},"parameters":{"RawVersion":{"name":"Raw-Version","in":"header","required":false,"description":"The API version, a date. Without it: the version the key is pinned to. Echoed on every answer.","schema":{"type":"string","enum":["2026-11-08"]}},"RawWorkspace":{"name":"Raw-Workspace","in":"header","required":false,"description":"The workspace to act in, ws_…. A personal token acts only in the workspace it names (one of its person's, with their relation there); a workspace key acts in its own, and naming another is 403 forbidden.","schema":{"type":"string","pattern":"^ws_"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string, 1 to 255 characters. For 24 hours the same request with it is answered as the first was (Idempotent-Replayed: true); another request with it is 409 idempotency_conflict.","schema":{"type":"string","minLength":1,"maxLength":255}}}}}