{"components":{"headers":{"RateLimit-Limit":{"description":"Requests the bucket that applies to this request holds when full.","schema":{"minimum":1,"type":"integer"}},"RateLimit-Remaining":{"description":"Requests that may be sent now, after this one. When several limits apply (per IP and per account) this is the one closest to refusing.","schema":{"minimum":0,"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the bucket is full again (0 when it is full).","schema":{"minimum":0,"type":"integer"}},"Retry-After":{"description":"Seconds until the next request will be allowed. Waiting exactly this long is enough.","schema":{"minimum":1,"type":"integer"}}},"parameters":{"ActivityCategory":{"description":"Filter by resource family. `egress` is a locked machine's refused outbound calls; `secret` is secret creation, rotation, deletion, binds and unbinds.","in":"query","name":"category","schema":{"enum":["all","machine","volume","snapshot","exec","egress","secret"],"type":"string"}},"ActivityCursor":{"description":"Opaque keyset cursor from a previous response's `next_cursor`.","in":"query","name":"cursor","schema":{"maxLength":512,"type":"string"}},"ActivityFrom":{"description":"Inclusive lower bound.","in":"query","name":"from","schema":{"$ref":"#/components/schemas/DateOrDateTime"}},"ActivityLimit":{"description":"Page size. Default 50.","in":"query","name":"limit","schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}},"ActivityPageSize":{"deprecated":true,"description":"The older name for `limit`, kept for existing callers. Giving both is a 400.","in":"query","name":"page_size","schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}},"ActivitySearch":{"description":"Case-insensitive match on action, actor, or a resource id.","in":"query","name":"q","schema":{"maxLength":200,"type":"string"}},"ActivityTo":{"description":"Exclusive upper bound; must not be before `from`.","in":"query","name":"to","schema":{"$ref":"#/components/schemas/DateOrDateTime"}},"Cursor":{"description":"Opaque position from a previous page's `next_cursor`. Pass it back unchanged; it is not a stable format. Omit for the first page.","in":"query","name":"cursor","schema":{"maxLength":256,"type":"string"}},"ExecID":{"description":"The handle you minted on `POST /v1/machines/{id}/execs`.","in":"path","name":"execID","required":true,"schema":{"type":"string"}},"IdempotencyKey":{"description":"Replay-safe creation: the same key with the same body returns the same\nmachine. The same key with a DIFFERENT body is `422 idempotency_key_reused`.\nAt most 255 printable ASCII characters (a UUID is ideal); longer is a `400`.\n","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"pattern":"^[!-~]+$","type":"string"}},"Limit":{"description":"Page size. Default 100.","in":"query","name":"limit","schema":{"default":100,"maximum":200,"minimum":1,"type":"integer"}},"MachineID":{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},"SnapshotID":{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},"VolumeID":{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}},"responses":{"AttachConflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The machine is not stopped, the volume is already attached, the two are on different hosts, or the machine already holds the maximum number of data volumes (4). Firecracker cannot hot-add drives, so attach and detach both require a stopped machine."},"BadRequest":{"content":{"application/json":{"example":{"code":"validation_error","detail":"unknown query parameter \"limt\" — this endpoint accepts limit, cursor","request_id":"6f1c2a9e4b7d3c10"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"`validation_error` — the request does not match this endpoint's contract: an unknown query parameter or body field (named in `detail`, with what the endpoint accepts), a value out of range, a parameter given twice, a body on a route that takes none, or invalid JSON. Not retryable as-is."},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated but not allowed (e.g. a read key on a mutating route)."},"ForbiddenOrQuota":{"content":{"application/json":{"examples":{"quotaExceeded":{"summary":"Plan limit would be exceeded (free tier)","value":{"code":"quota_exceeded","detail":"This would exceed the vCPU quota: 1 of 1 in use. Free up vCPU, or add a payment method and top up to raise your limits."}},"readKeyOnMutation":{"summary":"Read-scope key on a mutating route","value":{"code":"forbidden","detail":"this API key is read-only"}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed. Two distinct causes, told apart by the `code` field — they\nneed different client behaviour, so branch on `code`, never on the status:\n\n* `forbidden` — the credential may not do this at all (e.g. a read-scope\n  API key on a mutating route). Retrying is pointless.\n* `quota_exceeded` — this request would exceed one of the account's plan\n  limits. The message names the dimension that bound (machines, vCPU,\n  memory, storage, volumes) and how much of it is in use. **Retry succeeds\n  after freeing that resource** (stop/destroy a machine, delete a volume)\n  or after the limit is raised. `GET /v1/quotas` reports current usage\n  against every limit.\n\nA rarer third case also uses `quota_exceeded`: a fleet-wide ceiling rather\nthan the account's plan. Its message says \"fleet limit\" and topping up\nwill not lift it — that one is an operator matter.\n"},"InsufficientBalance":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Payment required (`insufficient_balance`) — the prepaid balance is at or below zero, or too small to cover what was asked. Top up; freeing resources does not help. Distinct from 403 `quota_exceeded` (free something and retry) and from 401/403 auth failures. Anything that creates ongoing cost — a machine create or start, a volume, a snapshot — is refused this way. ⚠ Was 409 `conflict` until 2026-10-11, on the stated grounds that \"clients already branch on the conflict code\". None did: both SDKs map 402 and 409 to the same APIError and the dashboard shows the detail. What the 409 cost was an agent unable to tell \"top up\" from a reused exec_id without parsing English."},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No such resource owned by the caller."},"PayloadTooLarge":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"`payload_too_large` — the JSON body is over the API's 1 MiB request limit. Applies to every JSON route; the exec `script` is where it is met in practice. Not retryable as-is: send less per request. Distinct from 400 `validation_error`, which means the body could not be parsed."},"TooManyRequests":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"`rate_limited` — a rate limit refused this request. Wait `Retry-After` seconds and retry; nothing was done. Every response to a rate-limited route carries the `RateLimit-*` headers, so a client can pace itself before it reaches this.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing/invalid credentials (generic — no info leak)."}},"schemas":{"APIKey":{"properties":{"created_at":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"last4":{"example":"a1b2","type":"string"},"last_used_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"prefix":{"example":"sk_live_","type":"string"},"revoked_at":{"format":"date-time","type":["string","null"]},"scope":{"enum":["read","full"],"type":"string"}},"required":["id","name","scope","prefix","last4","created_at"],"type":"object"},"ActivityEntry":{"description":"One row of the user-facing Activity feed. Metadata-only: `metadata` holds\nids/sizes/exit-codes chosen from a whitelist — never script text, command\noutput, resource names, or host detail.\n","properties":{"action":{"enum":["machine.created","machine.started","machine.stopped","machine.destroyed","exec","volume.created","volume.attached","volume.detached","volume.deleted","snapshot.created","snapshot.restored","snapshot.deleted"],"type":"string"},"actor":{"description":"Who performed the action.","enum":["user","system:spend_guard","system:reclaimer"],"example":"user","type":"string"},"created_at":{"format":"date-time","type":"string"},"machine_id":{"description":"The machine this action concerned; null for account-level actions (e.g. an unattached volume).","type":["string","null"]},"metadata":{"additionalProperties":true,"description":"Whitelisted, action-specific detail. e.g. exec → {exit_code, timeout_sec}; machine.created → {stack, vcpus, memory_mb, rootfs_gb}; volume.created → {volume_id, size_gb}.","type":"object"}},"required":["action","actor","metadata","created_at"],"type":"object"},"ActivityFeed":{"description":"A page of the Activity feed. Paginate with `next_cursor` (null = last page).","properties":{"activity":{"items":{"$ref":"#/components/schemas/ActivityEntry"},"type":"array"},"next_cursor":{"description":"Opaque keyset cursor for the next page; null when there are no more rows.","type":["string","null"]},"total":{"description":"Total rows matching the filter (ignores pagination).","type":"integer"}},"required":["activity","total","next_cursor"],"type":"object"},"AsyncExecRequest":{"additionalProperties":false,"properties":{"cwd":{"description":"Absolute working directory, created if missing. Default `/root`.","example":"/root/app","type":"string"},"env":{"additionalProperties":{"type":"string"},"description":"Extra environment variables (names [A-Za-z_][A-Za-z0-9_]*, ≤256, ≤128 KiB).","example":{"NODE_ENV":"test"},"type":"object"},"exec_id":{"description":"You mint this. 1–64 characters of letters, digits, `.`, `-` or `_`.\nA UUID is a valid choice. Re-sending the same id is a `409`, not a\nsecond run.\n","example":"11111111-2222-3333-4444-555555555555","type":"string"},"script":{"example":"npm ci \u0026\u0026 npm run build","type":"string"},"stdin":{"description":"Not supported yet, and refused rather than ignored: any value is a `400` whose message says how to feed input from the script instead (a heredoc). Declared so that refusal can name the reason."},"timeout_sec":{"default":120,"maximum":86400,"minimum":1,"type":"integer"}},"required":["exec_id","script"],"type":"object"},"Balance":{"description":"The prepaid-wallet view — balance, tier, recent top-ups, and trial-bonus availability.","properties":{"balance_micros":{"description":"running balance in micro-euros (may be slightly negative from storage)","format":"int64","type":"integer"},"has_payment_method":{"description":"Whether a Stripe customer exists for this account. The billing portal\nneeds one, so a client that offers \"manage payment method\" without\nchecking gets a 400 for any account that has never paid.\n","type":"boolean"},"tax_enabled":{"description":"Whether VAT is added to top-ups. While false, a €10 top-up costs\nexactly €10. Drive any \"amounts exclude VAT\" wording from this field\nrather than assuming.\n","type":"boolean"},"tier":{"example":"payg","type":"string"},"transactions":{"items":{"$ref":"#/components/schemas/WalletTransaction"},"type":"array"},"trial_bonus_available":{"description":"true while the account hasn't unlocked the trial bonus yet (still on the free tier)","type":"boolean"},"trial_bonus_micros":{"description":"credit unlocked by adding a card","example":25000000,"format":"int64","type":"integer"}},"required":["balance_micros","tier","transactions","trial_bonus_micros","trial_bonus_available"],"type":"object"},"CreateAPIKeyRequest":{"additionalProperties":false,"properties":{"expires_in_days":{"example":90,"type":["integer","null"]},"name":{"example":"ci-pipeline","type":"string"},"scope":{"default":"full","enum":["read","full"],"type":"string"}},"required":["name"],"type":"object"},"CreateAPIKeyResponse":{"allOf":[{"$ref":"#/components/schemas/APIKey"},{"properties":{"key":{"description":"The one-time plaintext secret — store it now.","example":"sk_live_xxxxxxxxxxxxxxxxxxxxxxxx","type":"string"}},"required":["key"],"type":"object"}]},"CreateMachineRequest":{"additionalProperties":false,"properties":{"allow":{"description":"The hosts a `locked` machine may reach, over ports 80 and 443 only. Each entry is a host name: exact (`pypi.org`) or with one leading `*.` (`*.pythonhosted.org`, which matches subdomains but not the name itself). Lowercased and de-duplicated. IP addresses, schemes, ports, paths and a bare `*` are a `400`, as is `allow` without `network: locked`.","items":{"example":"api.example.com","type":"string"},"maxItems":64,"type":"array"},"memory_mb":{"description":"Capped per machine by plan (free 2048, payg 16384); over it is a 400 validation_error.","example":1024,"type":"integer"},"metadata":{"additionalProperties":true,"type":"object"},"name":{"example":"my-sandbox","type":"string"},"network":{"default":"open","description":"Outbound network policy. `open` (the default) is the public internet, minus mail and a few abuse ports that are always blocked. `locked` refuses every outbound connection except HTTP and HTTPS to the hosts in `allow`. A call to any other host is refused: over plain HTTP with `403` and `{\"code\": \"egress_domain_not_allowed\", \"host\", \"retryable\": false}`, over HTTPS by closing the connection (no status can be sent inside TLS without decrypting it). Other names resolve to the egress path itself, never to a real address, and a connection made straight to an IP address is refused. Locked with an empty `allow` has no public outbound at all. A host that cannot enforce `locked` refuses the create with `503 no_host_available` rather than booting it open. An allowed name that resolves only to private or reserved addresses is refused with `403` and `{\"code\": \"egress_address_not_public\", \"retryable\": false}`. Omitted means `open` — except that creating from a `snapshot_id` or `root_volume_id` whose `source_network` is `locked` without saying `network` is a `400`: choose `locked` (with `allow`) or `open` explicitly.","enum":["open","locked"],"type":"string"},"root_volume_id":{"description":"Boot from an existing, detached root volume instead of a fresh template clone — how a machine deleted with `preserve_storage=true` is brought back. Placement is pinned to the volume's host. Mutually exclusive with `snapshot_id`.","format":"uuid","type":"string"},"rootfs_size_gb":{"default":10,"description":"Root disk size. A machine's disk is a copy-on-write clone of a golden template that is only ever grown, never shrunk, so sizes below the minimum are rejected with a validation_error rather than silently provisioned at the template's size. Defaults to the minimum when omitted.","example":10,"maximum":200,"minimum":10,"type":"integer"},"secrets":{"description":"Names of your secrets to bind. A box secret's value reaches this machine's execs as an environment variable; a proxy secret's placeholder does, and the machine trusts its own egress certificate authority for HTTPS (installed in the system trust store, with the common CA-bundle environment variables set on every exec). A proxy secret needs `network: locked` and its hosts in `allow`. An unknown name is a `400` before anything is created.","items":{"type":"string"},"maxItems":16,"type":"array"},"snapshot_id":{"description":"Deploy a new machine from a snapshot: its root volume is a copy-on-write clone of that snapshot, leaving the original untouched (unlike `POST /v1/snapshots/{id}/restore`, which rolls back in place). Placement is pinned to the snapshot's host. Mutually exclusive with `root_volume_id`.","format":"uuid","type":"string"},"stack":{"description":"The catalog image name from `GET /v1/images` (`base`, `python`, `node`, `debian13`, `ubuntu26.04`, `ai`). Resolved to the latest ready template revision at create time. An unknown name is a `400` — never a silent fallback to a different image.","example":"base","type":"string"},"vcpus":{"description":"Capped per machine by plan (free 2, payg 8); over it is a 400 validation_error. See `per_machine` on GET /v1/quotas.","example":2,"type":"integer"},"volumes":{"description":"Existing, detached volumes to attach before the first boot, in order: the first is `/dev/vdb`, the next `/dev/vdc`, and the order is kept on every restart. Placement is pinned to the volumes' host — use this to reuse a volume after destroying its machine, since a new machine created without it may land on another host, where attaching answers `409`. All volumes must be on one host (and on the same host as `root_volume_id` or `snapshot_id`, if given): otherwise `409`. A volume that is attached or busy is `409`; one that does not exist is `404`; duplicates or more than 4 are `400`. If the host refuses the create, the volumes are released; if the create fails ambiguously the machine is left in `error` holding them, and destroying it releases them.","items":{"format":"uuid","type":"string"},"maxItems":4,"type":"array"}},"type":"object"},"CreateSecretRequest":{"additionalProperties":false,"properties":{"custody":{"default":"box","description":"`box`: the value is put into the machine's environment (the machine can read it). `proxy`: the machine gets a placeholder and its egress path swaps the value in on HTTPS requests to `hosts` — the machine never holds the value. `proxy` requires `hosts` and `presentation`.","enum":["box","proxy"],"type":"string"},"hosts":{"description":"Host names this credential is for (same rules as a machine's `allow`). Proxy custody: the only hosts the value is ever sent to, required, and each must be on the `allow` of any machine it is bound to (a wildcard host is covered only by the same wildcard). Box custody: recorded only.","items":{"type":"string"},"maxItems":64,"type":"array"},"method":{"description":"Proxy custody only — redeem only for this HTTP method, in capitals (POST).","type":"string"},"name":{"description":"Also the environment variable it becomes. Reserved: PATH, HOME, USER, SHELL, PWD, LANG, TERM, HOSTNAME, IFS, and any name starting SISTEMO_ or LD_.","pattern":"^[A-Z_][A-Z0-9_]{0,63}$","type":"string"},"path_prefix":{"description":"Proxy custody only — redeem only for request paths starting with this; must start with `/`.","maxLength":256,"type":"string"},"presentation":{"description":"Proxy custody only — where the request carries the placeholder, and so where the value is put: `bearer` (`Authorization: Bearer \u003cplaceholder\u003e`), `basic` (the placeholder as the Basic-auth user or password), `header:\u003cName\u003e` (inside that header; never `Host`) or `query:\u003cparam\u003e` (that query parameter's value).","type":"string"},"value":{"description":"Write-only. At most 8 KiB; no NUL byte. A proxy secret's value must be at least 8 characters (it is masked out of every response from its hosts).","maxLength":8192,"type":"string","writeOnly":true}},"required":["name","value"],"type":"object"},"CreateVolumeRequest":{"additionalProperties":false,"properties":{"name":{"example":"my-data","type":"string"},"size_gb":{"description":"Size in GB, 5–50 per volume. Your plan's storage quota bounds the total across all your disks (`GET /v1/quotas`). A volume cannot be resized after creation.","example":20,"maximum":50,"minimum":5,"type":"integer"}},"required":["size_gb"],"type":"object"},"DateOrDateTime":{"anyOf":[{"format":"date-time"},{"format":"date"}],"description":"An RFC 3339 timestamp, or a plain date (YYYY-MM-DD, read as midnight UTC).","examples":["2026-11-01","2026-11-01T09:30:00Z"],"type":"string"},"EgressEvent":{"properties":{"action":{"enum":["allowed","blocked"],"type":"string"},"at":{"description":"Start of the minute the attempts fell in.","format":"date-time","type":"string"},"host":{"description":"The host name the machine asked for.","example":"pypi.org","type":"string"}},"required":["host","action","at"],"type":"object"},"EgressLog":{"properties":{"activity":{"items":{"$ref":"#/components/schemas/EgressEvent"},"type":"array"},"complete":{"description":"False when rows are known to be missing — the log reached its size limit, the egress path restarted, the machine is not running, or the machine's network is `open` (open machines are not logged). An empty list is only \"no outbound calls\" when this is true.","type":"boolean"}},"required":["activity","complete"],"type":"object"},"Error":{"description":"Every error response from the API has this shape. Branch on `code`,\nnever on `detail`.\n","properties":{"code":{"description":"Stable, machine-readable. See docs/api/errors for the full set. `error` is the fallback for a status with no more specific code; treat an unknown value the same way, since new codes may be added.","enum":["validation_error","unauthorized","insufficient_balance","forbidden","quota_exceeded","not_found","conflict","too_many_execs","exec_id_in_use","machine_not_running","invalid_state_transition","gone","endpoint_retired","payload_too_large","rate_limited","internal_error","idempotency_key_reused","method_not_allowed","unprocessable","email_not_verified","not_implemented","host_agent_error","no_host_available","unavailable","error","machine_disk_full","machine_process_limit","machine_out_of_memory","machine_unresponsive"],"type":"string"},"detail":{"description":"Human-readable; safe to show the end user.","type":"string"},"doc_url":{"description":"The errors page entry for this code — what it means and what to do.","example":"https://docs.sistemo.io/api/errors/#no_host_available","format":"uri","type":"string"},"request_id":{"description":"Correlation id, equal to the X-Request-Id response header. Every log line\nthis request produced carries it — quote it to support.\n","type":"string"},"retryable":{"description":"True when sending the identical request again later can succeed without changing anything (back off first; honour Retry-After when present). Derived from `code`. False for quota_exceeded and insufficient_balance: those succeed only after you free something or top up.","type":"boolean"}},"required":["code","detail","retryable","doc_url"],"type":"object"},"ExecOutputPage":{"description":"One page of one stream of a job's output.","properties":{"data":{"contentEncoding":"base64","description":"⚠ Raw bytes, base64-encoded, and a page **can end mid-character**.\nDecode to bytes and hold a partial tail until the next page.\n","type":"string"},"eof":{"description":"⚠ True only when the exec is finished AND this offset reached the end.\nAn empty page from a running exec is \"nothing yet\" — stop on `eof`,\nnever on an empty page.\n","type":"boolean"},"next_offset":{"description":"Pass this as the next `offset`. It equals `offset` when nothing new\nhas been written, which is the normal answer while a quiet job runs.\n","format":"int64","type":"integer"},"offset":{"format":"int64","type":"integer"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["stream","offset","next_offset","data","eof"],"type":"object"},"Machine":{"properties":{"account_id":{"format":"uuid","type":"string"},"allow":{"description":"The locked machine's host allow-list. Always present; empty on an open machine.","items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"error_code":{"description":"Why the machine is in `error`, for code to branch on. Absent when it is not in `error`, or entered it before codes were recorded (2026-11-16). A failed start or stop is being re-checked automatically; `vm_missing` cannot come back — delete the machine.","enum":["create_failed","start_failed","stop_failed","delete_failed","vm_missing","stuck_transition"],"type":"string"},"error_message":{"description":"Why the machine is in `error`, for a person: what happened, what to do, and the request id to quote. Never carries host detail.","type":"string"},"git_repo":{"deprecated":true,"description":"Present only on machines created before 2026-11-16, when create accepted a `git_repo` it stored but never cloned. Create now refuses the field; clone with a command after the machine starts.","type":"string"},"id":{"format":"uuid","type":"string"},"memory_mb":{"type":"integer"},"metadata":{"additionalProperties":true,"type":"object"},"name":{"type":"string"},"network":{"description":"The outbound policy (see CreateMachineRequest.network).","enum":["open","locked"],"type":"string"},"private_ip":{"description":"The machine's own address on its private network, while it has one. It is the same on every machine (`169.254.0.22`): each machine has a network of its own, and no other machine can reach it.","example":"169.254.0.22","type":["string","null"]},"rootfs_size_gb":{"type":"integer"},"secrets":{"description":"Names of the secrets bound to this machine (never values). Always present.","items":{"type":"string"},"type":"array"},"source_snapshot_id":{"description":"The snapshot this machine was created from, or null. It stays set after that snapshot is deleted.","format":"uuid","type":["string","null"]},"stack":{"type":"string"},"started_at":{"format":"date-time","type":["string","null"]},"state":{"enum":["pending","provisioning","running","stopped","error","destroyed"],"type":"string"},"stopped_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"vcpus":{"type":"integer"}},"required":["id","account_id","name","state","created_at"],"type":"object"},"MachineExec":{"description":"One job. The command runs inside the machine; this is the record of it.\n","properties":{"created_at":{"format":"date-time","type":"string"},"exec_id":{"type":"string"},"exit_code":{"description":"⚠ **`null` until known, and `null` for ever when `state` is `lost`.**\nIt is never `0` as a placeholder — a zero here would read as success.\n`124` means expired, `143`/`137` mean cancelled.\n","type":["integer","null"]},"finished_at":{"format":"date-time","type":["string","null"]},"machine_id":{"format":"uuid","type":"string"},"oom_killed":{"description":"The machine ran out of memory and the kernel killed this command (or a process it started) — usually seen with `exit_code` 137. Commands run in a memory limit that keeps 64 MiB of the machine for the platform's agent, so a memory-hungry command is killed rather than the machine becoming unreachable. Always false on machines whose agent predates 2026-11-16.","type":"boolean"},"started_at":{"format":"date-time","type":["string","null"]},"state":{"description":"`pending` — started, not yet confirmed running.\n`running` — the machine holds a live process for it.\n`succeeded` — exited 0.\n`failed` — it ran and exited non-zero.\n`cancelled` — killed on instruction, including by the machine stopping.\n`expired` — hit its own wall-clock limit.\n`lost` — ⚠ the machine cannot account for it. This is **not**\n`failed`: we can say neither that it ran nor that it did not, so do\nnot retry blindly and do not assume completion.\n","enum":["pending","running","succeeded","failed","cancelled","expired","lost"],"type":"string"},"stderr_bytes":{"format":"int64","type":"integer"},"stdout_bytes":{"description":"Bytes readable on stdout — i.e. the next `offset` to poll from.","format":"int64","type":"integer"},"timeout_sec":{"description":"The lifetime the command was started with. Present only on the response to the start; ⚠ `null` on every later read (status, list, cancel), because the machine does not record it. It used to read `0`, which looked like \"no timeout\".","example":3600,"type":["integer","null"]},"truncated":{"description":"The per-exec output cap was reached and bytes were dropped.","type":"boolean"}},"required":["exec_id","machine_id","state","exit_code"],"type":"object"},"NextCursor":{"description":"Pass back as `cursor` for the next page; null when this is the last page.","type":["string","null"]},"Quotas":{"example":{"per_machine":{"memory_mb":2048,"vcpus":2},"quotas":[{"limit":3,"name":"machines","used":1},{"limit":4,"name":"vcpus","used":1},{"limit":4096,"name":"memory_mb","used":1024},{"limit":30,"name":"storage_gb","used":8},{"limit":2,"name":"volumes","used":0}],"tier":"free"},"properties":{"per_machine":{"description":"The largest SINGLE machine the plan allows, beneath the account-wide pools above. 0 in a field means no plan cap (the fleet ceiling applies).","properties":{"memory_mb":{"type":"integer"},"vcpus":{"type":"integer"}},"type":"object"},"quotas":{"items":{"properties":{"description":{"description":"What this dimension counts.","type":"string"},"limit":{"description":"Ceiling. 0 means provisioning is suspended, not unlimited.","type":"integer"},"name":{"enum":["machines","vcpus","memory_mb","storage_gb","volumes"],"type":"string"},"used":{"description":"Currently provisioned.","type":"integer"}},"type":"object"},"type":"array"},"tier":{"enum":["free","payg","enterprise"],"type":"string"}},"type":"object"},"Rates":{"description":"The live rate card in micro-euros per unit (€1 = 1_000_000).","properties":{"ram_gb_hour_micros":{"description":"€0.010 / GB-hour","example":10000,"format":"int64","type":"integer"},"storage_gb_month_micros":{"description":"€0.100 / GB-month","example":100000,"format":"int64","type":"integer"},"vcpu_hour_micros":{"description":"€0.035 / vCPU-hour","example":35000,"format":"int64","type":"integer"}},"required":["vcpu_hour_micros","ram_gb_hour_micros","storage_gb_month_micros"],"type":"object"},"RotateSecretRequest":{"additionalProperties":false,"properties":{"value":{"maxLength":8192,"type":"string","writeOnly":true}},"required":["value"],"type":"object"},"Secret":{"description":"A stored secret, as the API shows it. There is no value field — ever.","properties":{"bound_machines":{"description":"Live (not destroyed) machines it is bound to.","type":"integer"},"created_at":{"format":"date-time","type":"string"},"custody":{"enum":["box","proxy"],"type":"string"},"hosts":{"items":{"type":"string"},"type":"array"},"method":{"type":"string"},"name":{"example":"ORDERS_DB_URL","type":"string"},"path_prefix":{"type":"string"},"presentation":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["name","custody","hosts","bound_machines","created_at","updated_at"],"type":"object"},"SetMachineSecretsRequest":{"additionalProperties":false,"properties":{"bind":{"items":{"type":"string"},"type":"array"},"unbind":{"items":{"type":"string"},"type":"array"}},"type":"object"},"SetNetworkRequest":{"additionalProperties":false,"description":"Replaces the whole policy: `allow` is the complete new list, not a change to the old one. `network` is required here — an empty body is a `400`, never a silent switch to `open`.","properties":{"allow":{"description":"The hosts a `locked` machine may reach, over ports 80 and 443 only. Each entry is a host name: exact (`pypi.org`) or with one leading `*.` (`*.pythonhosted.org`, which matches subdomains but not the name itself). Lowercased and de-duplicated. IP addresses, schemes, ports, paths and a bare `*` are a `400`, as is `allow` without `network: locked`.","items":{"example":"api.example.com","type":"string"},"maxItems":64,"type":"array"},"network":{"description":"Outbound network policy. `open` (the default) is the public internet, minus mail and a few abuse ports that are always blocked. `locked` refuses every outbound connection except HTTP and HTTPS to the hosts in `allow`. A call to any other host is refused: over plain HTTP with `403` and `{\"code\": \"egress_domain_not_allowed\", \"host\", \"retryable\": false}`, over HTTPS by closing the connection (no status can be sent inside TLS without decrypting it). Other names resolve to the egress path itself, never to a real address, and a connection made straight to an IP address is refused. Locked with an empty `allow` has no public outbound at all. A host that cannot enforce `locked` refuses the create with `503 no_host_available` rather than booting it open.","enum":["open","locked"],"type":"string"}},"required":["network"],"type":"object"},"Snapshot":{"description":"A copy-on-write ZFS snapshot of a volume's contents at a point in time. Snapshots are of a **volume**, not a machine, and capture the disk only — not live memory, so restoring is a reboot from that disk, not a resume.\nA snapshot lives on the same host as its origin volume. It is an undo, not off-host disaster recovery: if the host is lost, the snapshot is lost with the volume.","properties":{"account_id":{"format":"uuid","type":"string"},"auto":{"description":"Taken by the system rather than by you","type":"boolean"},"created_at":{"format":"date-time","type":"string"},"error_message":{"type":"string"},"id":{"format":"uuid","type":"string"},"machine_id":{"description":"The machine it was taken from; null once that machine is gone","format":"uuid","type":["string","null"]},"name":{"type":"string"},"origin_volume_id":{"description":"The volume this is a snapshot OF","format":"uuid","type":["string","null"]},"size_bytes":{"description":"How much data the snapshot contains — what a restore, or a machine created from it, gets. Fixed for the snapshot's life. Null until it has been measured (briefly, for snapshots taken before 2026-11-17).","example":1400000000,"format":"int64","type":["integer","null"]},"size_gb":{"description":"`size_bytes` rounded up to whole GB.","example":2,"type":"integer"},"source_allow":{"description":"That machine's allow-list, when `source_network` is `locked`.","items":{"type":"string"},"type":"array"},"source_network":{"description":"The network policy of the machine this came from, recorded when the snapshot was taken. Absent when not recorded. Creating a machine from it without an explicit `network` is a `400` when this is `locked`.","enum":["open","locked"],"type":"string"},"state":{"enum":["creating","ready","restoring","deleting","error"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"used_bytes":{"description":"Space this snapshot alone holds — the data your machine has since overwritten or deleted, which only the snapshot still keeps. Near zero when the snapshot is new, and it grows as the disk changes. This is what snapshot storage is billed on, and it is re-measured about hourly.","format":"int64","type":"integer"}},"required":["id","account_id","name","state","created_at"],"type":"object"},"Template":{"description":"A catalog image a machine can be created from (pass its `name` as `stack`).","properties":{"created_at":{"format":"date-time","type":"string"},"description":{"type":"string"},"display_name":{"example":"Debian 13","type":"string"},"id":{"format":"uuid","type":"string"},"is_default":{"type":"boolean"},"name":{"description":"pass as `stack` on create","example":"debian13","type":"string"},"revision":{"description":"build date","example":"20260622","type":"string"},"sha256":{"type":"string"},"status":{"enum":["ready","retired"],"type":"string"},"template_id":{"example":"debian13_20260622","type":"string"}},"required":["name","template_id","revision","is_default","status"],"type":"object"},"UsageSeriesPoint":{"description":"One day's metered cost split by resource, in micro-euros.","properties":{"compute_micros":{"format":"int64","type":"integer"},"date":{"description":"YYYY-MM-DD (UTC)","example":"2026-07-01","type":"string"},"ram_micros":{"format":"int64","type":"integer"},"snapshot_micros":{"format":"int64","type":"integer"},"storage_micros":{"format":"int64","type":"integer"}},"required":["date","compute_micros","ram_micros","storage_micros","snapshot_micros"],"type":"object"},"UsageSummary":{"description":"Current billing-month metered quantities (priced via the rate card).","properties":{"ram_gb_hours":{"format":"double","type":"number"},"snapshot_gb_month":{"format":"double","type":"number"},"storage_gb_month":{"format":"double","type":"number"},"tier":{"example":"payg","type":"string"},"total_cost_micros":{"description":"total spent over the range (micro-euros, all metrics)","format":"int64","type":"integer"},"vcpu_hours":{"format":"double","type":"number"}},"required":["vcpu_hours","ram_gb_hours","storage_gb_month","snapshot_gb_month","total_cost_micros","tier"],"type":"object"},"Volume":{"description":"A disk. `role: root` is a machine's boot disk — a real, detachable volume that can be preserved past its machine and re-attached to a new one. `role: data` is one you created.","properties":{"account_id":{"format":"uuid","type":"string"},"attached_as":{"description":"The role this volume plays in its CURRENT attachment; absent when it\nmatches `role`. `data` on a root disk means it is mounted as an extra\ndrive for recovery, not as the machine's boot device. Cleared on\ndetach — it describes an attachment, not the disk.\n","enum":["root","data"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"machine_id":{"description":"Set while attached","format":"uuid","type":["string","null"]},"name":{"type":"string"},"role":{"enum":["root","data"],"type":"string"},"size_gb":{"type":"integer"},"source_allow":{"description":"That machine's allow-list, when `source_network` is `locked`.","items":{"type":"string"},"type":"array"},"source_network":{"description":"The network policy of the machine this came from, recorded when its machine was destroyed with `preserve_storage`. Absent when not recorded. Creating a machine from it without an explicit `network` is a `400` when this is `locked`.","enum":["open","locked"],"type":"string"},"state":{"description":"`provisioning` is a reservation held during create or delete — it is never billed and cannot be attached.","enum":["provisioning","available","attached","snapshotting","error"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","account_id","name","size_gb","state","created_at"],"type":"object"},"WalletTransaction":{"description":"A money-in event on the prepaid balance (top-up or manual adjustment).","properties":{"amount_micros":{"description":"positive = credit","format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"enum":["topup","trial_bonus","adjustment"],"type":"string"}},"required":["id","amount_micros","kind","created_at"],"type":"object"}},"securitySchemes":{"BearerApiKey":{"bearerFormat":"sk_live_…","description":"A developer API key, sent as `Authorization: Bearer sk_live_…`.","scheme":"bearer","type":"http"},"SessionCookie":{"description":"The dashboard login session (cookie + `X-CSRF-Token`).","in":"cookie","name":"access_token","type":"apiKey"}}},"info":{"description":"The Sistemo Cloud API, at `https://api.sistemo.io`: machines and their\nlifecycle, commands (`execs`), volumes, snapshots, secrets, images, the\nActivity feed, billing and quotas. The Python and JavaScript SDKs are thin\nclients over it.\n\n**Authentication.** Send an API key as `Authorization: Bearer sk_live_…`.\nA **read** key can read; anything that changes state needs a **full** key,\nand a read key gets `403`. Managing API keys, and creating, rotating and\ndeleting secrets, happen in the dashboard; an API key cannot call those\nroutes (binding a secret to a machine by name can).\n\n**Input is strict.** An unknown query parameter or body field, a value out\nof range, a parameter given twice, or a body on a route that takes none is a\n`400 validation_error` whose `detail` names the problem and what the\nendpoint accepts. An empty query value (`?limit=`) counts as absent.\n\n**Lists** take `limit` (1–200, default 100) and an opaque `cursor`, and\nreturn `{\"\u003citems\u003e\": [...], \"next_cursor\": \"…\" | null}`, newest first. Pass\n`next_cursor` back as `cursor`; `null` means there are no more. Rows created\nwhile you page neither repeat nor go missing.\n\n**Rate limits.** Rate-limited responses carry `RateLimit-Limit`,\n`RateLimit-Remaining` and `RateLimit-Reset`; a `429` adds `Retry-After`, and so does every retryable `503`\n(`no_host_available`, `unavailable`, `machine_unresponsive`).\n\n**Errors** share one JSON shape: a stable `code` to branch on, a `detail`\nsafe to show, `retryable`, a `doc_url` explaining the code, and a\n`request_id` to quote to support.\n\n**Machine and Sandbox.** The API's resource is a `machine`. The SDKs'\n`Sandbox` is a way of using one, not a second resource: `Sandbox().run(...)`\nstarts a command with `POST /v1/machines/{id}/execs` and waits for it.\n\nThis document is served by the API it describes, at `GET /v1/openapi.json`,\nand is checked against it: every route, parameter, range, enum value and\nbody field described here is exactly what the API accepts. Signing in, the\nbrowser terminal and the website's invite form serve the dashboard and the\nwebsite; they are not part of this API and are not described here.\n","title":"Sistemo Cloud API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/v1/activity":{"get":{"description":"The account's whole Activity feed — a **metadata-only** record of machine,\nvolume, and snapshot lifecycle + `exec`, and who performed each action\n(`user`, or `system:spend_guard` / `system:reclaimer` for background\nworkers). It **never** contains script text or command output. Ordered\nnewest-first.\n\n**Filtering** (all optional): `category` (machine|volume|snapshot|exec),\n`q` (case-insensitive match on action/actor/resource id), and a `from`/`to`\nRFC3339 time window. **Pagination is keyset**: pass the response's\n`next_cursor` back as `cursor` for the next page (stable while new events\narrive — no OFFSET skew). A `null` `next_cursor` means the last page.\n","operationId":"listActivity","parameters":[{"$ref":"#/components/parameters/ActivityLimit"},{"$ref":"#/components/parameters/ActivityPageSize"},{"$ref":"#/components/parameters/ActivityCategory"},{"$ref":"#/components/parameters/ActivitySearch"},{"$ref":"#/components/parameters/ActivityFrom"},{"$ref":"#/components/parameters/ActivityTo"},{"$ref":"#/components/parameters/ActivityCursor"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityFeed"}}},"description":"The account's activity (newest first) + total + next_cursor."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid category, from/to, or cursor."},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Account Activity feed","tags":["activity"]}},"/v1/api-keys":{"get":{"description":"Session-only. Never returns the secret — only `prefix` + `last4`.","operationId":"listAPIKeys","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"api_keys":{"items":{"$ref":"#/components/schemas/APIKey"},"type":"array"},"next_cursor":{"$ref":"#/components/schemas/NextCursor"}},"required":["api_keys","next_cursor"],"type":"object"}}},"description":"The account's keys."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Called with an API key instead of a session."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"SessionCookie":[]}],"summary":"List your API keys","tags":["api-keys"]},"post":{"description":"Session-only. Returns the plaintext `key` **exactly once** — it is never\nretrievable again. Cap of 50 active keys per account.\n","operationId":"createAPIKey","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyResponse"}}},"description":"Key created; `key` is the one-time secret."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Called with an API key instead of a session."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"SessionCookie":[]}],"summary":"Create an API key","tags":["api-keys"]}},"/v1/api-keys/{id}":{"delete":{"description":"Session-only. Immediate — clients using the key stop working at once.","operationId":"revokeAPIKey","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"example":"revoked","type":"string"}},"type":"object"}}},"description":"Revoked."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Called with an API key instead of a session."},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"SessionCookie":[]}],"summary":"Revoke an API key","tags":["api-keys"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}]},"/v1/billing/add-card":{"post":{"description":"Opens a Stripe Checkout session in **setup** mode — it saves a card\nWITHOUT charging. On completion the webhook unlocks a one-time trial\nbonus (credits `trial_bonus_micros`). The bonus is granted at most once\nper account and only while still on the free tier. **Session-only.**\n\n⚠ Adding a card **keeps the account on `free`**. Only a real top-up\nflips `free` → `payg`, which is what makes `payg` mean \"has actually\npaid\" and is what lifts the reclaim grace window from 3 days to 30.\n(This description claimed the opposite until 2026-09-21.)\n\n⚠ The Stripe **Customer is created before the session**, and the call\nfails if that fails rather than opening Checkout without one:\n`customer_creation: \"always\"` is payment-mode only, so a setup session\ngiven nothing but an email completes with `customer: null` and saves a\nPaymentMethod attached to nobody. The symptom was\n`has_payment_method: false` immediately after a *successful* card-add,\na billing portal that refused to open, and a later top-up minting a\nsecond Customer — while the bonus landed normally, which hid it.\n","operationId":"createAddCardSession","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"url":{"example":"https://checkout.stripe.com/c/pay/cs_test_...","type":"string"}},"type":"object"}}},"description":"A Stripe Checkout URL to redirect the user to."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Called with an API key instead of a session."},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The payment provider could not set up card payments for the account. Nothing was charged and nothing was saved; the call is safe to retry."}},"summary":"Add a payment method (unlock the trial bonus)","tags":["billing"]}},"/v1/billing/balance":{"get":{"operationId":"getBillingBalance","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}},"description":"Balance, tier, and the most recent wallet transactions."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Prepaid balance + recent top-ups","tags":["billing"]}},"/v1/billing/portal":{"post":{"description":"Returns a URL to Stripe's hosted portal, where the customer manages their\nsaved payment method and sees Stripe's own receipts. Billing itself is\nprepaid and lives here, not in Stripe — the portal is not where the balance\nor usage is shown.\n\n**Dashboard session only** (like top-up and add-card): an API key of either\nscope gets 403. The URL grants access to the payment-method surface, so it\nis not something a leaked read key should be able to mint. `POST` rather\nthan `GET` because the call creates a Stripe session — it is a mutation,\nand CSRF protection is applied by method.\n","operationId":"createBillingPortalSession","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"url":{"format":"uri","type":"string"}},"type":"object"}}},"description":"The portal URL."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated with an API key — this route requires a dashboard session."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Open the Stripe customer portal","tags":["billing"]}},"/v1/billing/rates":{"get":{"description":"The prices the meter actually bills, in micro-euros (€1 = 1_000_000).\nThe dashboard cost estimator reads this instead of hardcoding prices, so\nthe \"what will this cost\" figure can never drift from metered reality.\nOpen to read and full keys (and sessions).\n","operationId":"getBillingRates","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rates"}}},"description":"The current rate card."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"The live rate card (micro-euros per unit)","tags":["billing"]}},"/v1/billing/topup":{"post":{"description":"Opens a one-time Stripe Checkout payment (min €10) that, on completion,\ncredits the prepaid balance via the webhook. **Session-only** — spending\nmoney is never allowed via an API key.\n","operationId":"createTopup","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amount_micros":{"description":"Amount to add, in micro-euros (min €10 = 10_000_000).","example":10000000,"format":"int64","minimum":10000000,"type":"integer"}},"required":["amount_micros"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"url":{"example":"https://checkout.stripe.com/c/pay/cs_test_...","type":"string"}},"type":"object"}}},"description":"A Stripe Checkout URL to redirect the user to."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Amount below €10 or above €10,000."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Called with an API key instead of a session."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Start a Stripe top-up payment","tags":["billing"]}},"/v1/billing/usage":{"get":{"description":"Quantities + total spent over [from,to) (priced via the rate card).\nThe window must be a forward range no wider than **366 days** (else 400).\n","operationId":"getBillingUsage","parameters":[{"description":"range start (default: current month)","in":"query","name":"from","schema":{"$ref":"#/components/schemas/DateOrDateTime"}},{"description":"range end, exclusive (default: now); must be after from and within 366 days","in":"query","name":"to","schema":{"$ref":"#/components/schemas/DateOrDateTime"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummary"}}},"description":"vCPU-hours, RAM GB-hours, storage/snapshot GB-months, total spent + tier."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Inverted range or window wider than 366 days."},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Metered usage totals over a range","tags":["billing"]}},"/v1/billing/usage/by-resource":{"get":{"description":"Cost attributed to each machine, volume, and snapshot over the period —\n`by_type` subtotals (count + % of total) plus a cost-sorted, paginated\nresource list. Deleted resources still appear (attribution is stamped at\naccrual and never nulled). `?format=csv` streams the export as a CSV\ndownload (bounded server-side). Range must be forward and within **366\ndays** (else 400).\n","operationId":"getBillingUsageByResource","parameters":[{"description":"filter to one resource type","in":"query","name":"type","schema":{"enum":["machine","volume","snapshot"],"type":"string"}},{"description":"period start (default: current month)","in":"query","name":"from","schema":{"$ref":"#/components/schemas/DateOrDateTime"}},{"description":"period end, exclusive (default: now); must be after from and within 366 days","in":"query","name":"to","schema":{"$ref":"#/components/schemas/DateOrDateTime"}},{"in":"query","name":"page","schema":{"default":1,"maximum":1000000,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","schema":{"default":25,"maximum":200,"minimum":1,"type":"integer"}},{"description":"`csv` streams the export as CSV (bounded server-side)","in":"query","name":"format","schema":{"default":"json","enum":["json","csv"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"by_type":{"items":{"properties":{"cost_micros":{"format":"int64","type":"integer"},"count":{"type":"integer"},"pct":{"type":"number"},"type":{"type":"string"}},"type":"object"},"type":"array"},"from":{"format":"date-time","type":"string"},"page":{"type":"integer"},"page_size":{"type":"integer"},"resources":{"items":{"properties":{"cost_micros":{"format":"int64","type":"integer"},"name":{"type":"string"},"pct":{"type":"number"},"ram_gb_hours":{"type":"number"},"ref":{"type":"string"},"snapshot_gb_months":{"type":"number"},"storage_gb_months":{"type":"number"},"type":{"type":"string"},"vcpu_hours":{"type":"number"}},"type":"object"},"type":"array"},"to":{"format":"date-time","type":"string"},"total":{"type":"integer"},"total_cost_micros":{"format":"int64","type":"integer"}},"type":"object"}},"text/csv":{"schema":{"type":"string"}}},"description":"Breakdown (JSON) or a CSV download (format=csv)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Inverted range or window wider than 366 days."},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Per-resource cost breakdown (machines / volumes / snapshots)","tags":["billing"]}},"/v1/billing/usage/series":{"get":{"description":"Daily buckets of compute/RAM/storage/snapshot cost (micro-euros) — the\ndashboard chart. Range must be forward and within **366 days** (else 400).\n","operationId":"getBillingUsageSeries","parameters":[{"description":"range start (default: current month)","in":"query","name":"from","schema":{"$ref":"#/components/schemas/DateOrDateTime"}},{"description":"range end, exclusive (default: now); must be after from and within 366 days","in":"query","name":"to","schema":{"$ref":"#/components/schemas/DateOrDateTime"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UsageSeriesPoint"},"type":"array"}}},"description":"One point per day with cost split by resource."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Inverted range or window wider than 366 days."},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Daily cost-by-resource over a range","tags":["billing"]}},"/v1/images":{"get":{"description":"The current (latest ready) golden template per image name — the create\nform's image picker. Open to read and full keys (and sessions). Pass the\nchosen `name` as `stack` to `POST /v1/machines` and the control plane\nresolves it to the template_id.\n","operationId":"listImages","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"images":{"items":{"$ref":"#/components/schemas/Template"},"type":"array"}},"type":"object"}}},"description":"The available images."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"List the image catalog","tags":["images"]}},"/v1/machines":{"get":{"description":"Newest first; destroyed machines are never listed. Open to read and full\nkeys (and sessions).\n\nFilters combine with AND: `state=running\u0026metadata[team]=ml\u0026metadata[env]=ci`\nlists running machines whose metadata contains both pairs.\n","operationId":"listMachines","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"description":"Only machines in this state.","in":"query","name":"state","schema":{"enum":["pending","provisioning","running","stopping","stopped","starting","destroying","error"],"type":"string"}},{"description":"`metadata[key]=value` — only machines whose metadata has this key set to exactly this string value. Up to 10 pairs, all of which must match.","example":{"team":"ml"},"explode":true,"in":"query","name":"metadata","schema":{"additionalProperties":{"maxLength":256,"type":"string"},"maxProperties":10,"propertyNames":{"pattern":"^[A-Za-z0-9_.-]{1,64}$"},"type":"object"},"style":"deepObject"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"machines":{"items":{"$ref":"#/components/schemas/Machine"},"type":"array"},"next_cursor":{"$ref":"#/components/schemas/NextCursor"}},"required":["machines","next_cursor"],"type":"object"}}},"description":"The caller's machines."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"List your machines","tags":["machines"]},"post":{"description":"Requires a **full**-scoped key or a session. Supports `Idempotency-Key`.","operationId":"createMachine","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMachineRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Machine"}}},"description":"Machine created (provisioning asynchronously)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Validation error — an unknown `stack`, or vcpus/memory/disk outside the fleet's configured bounds."},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/InsufficientBalance"},"403":{"$ref":"#/components/responses/ForbiddenOrQuota"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No host can take this machine — the fleet is out of memory, disk or IPs for a machine this size (`no_host_available`). Retryable."}},"summary":"Create a machine (sandbox)","tags":["machines"]}},"/v1/machines/{id}":{"delete":{"description":"Requires a **full**-scoped key or a session. Hard-deletes the machine row;\nthe Activity feed and `event_log` outlive it.\n\n`preserve_storage=true` detaches the root volume and keeps attached data\nvolumes instead of reclaiming them — the disks survive and can be booted\nonto a new machine via `root_volume_id`. They keep billing storage.\n\nIf the machine has snapshots the delete is **refused with `409`** unless\n`delete_snapshots=true` is also passed: a snapshot's ZFS dataset is a child\nof the root volume's, so removing the machine underneath it would strand it.\nThere is currently no way to delete a machine and keep its snapshots.\n","operationId":"deleteMachine","parameters":[{"in":"query","name":"preserve_storage","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Required (true) when the machine has snapshots. They are destroyed together with the root volume in a single host operation, so a failed delete never leaves the snapshots gone and the machine standing.\n","in":"query","name":"delete_snapshots","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"preserve_storage":{"type":"boolean"},"status":{"example":"destroyed","type":"string"}},"type":"object"}}},"description":"Destroyed."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Refused with nothing destroyed — either the machine has snapshots and `delete_snapshots` was not set, or another machine was deployed from one of those snapshots and must be deleted first. The machine is left exactly as it was.\n"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Destroy a machine","tags":["machines"]},"get":{"operationId":"getMachine","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Machine"}}},"description":"The machine."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Get one machine","tags":["machines"]},"parameters":[{"$ref":"#/components/parameters/MachineID"}]},"/v1/machines/{id}/activity":{"get":{"description":"One machine's Activity feed (account-scoped). Because the feed outlives\nthe machine (`machine_id` has no FK), this still returns rows **after the\nmachine is destroyed**. Metadata only — never script text or output.\nSame filtering + keyset pagination as `GET /v1/activity`.\n","operationId":"listMachineActivity","parameters":[{"$ref":"#/components/parameters/ActivityLimit"},{"$ref":"#/components/parameters/ActivityPageSize"},{"$ref":"#/components/parameters/ActivityCategory"},{"$ref":"#/components/parameters/ActivitySearch"},{"$ref":"#/components/parameters/ActivityFrom"},{"$ref":"#/components/parameters/ActivityTo"},{"$ref":"#/components/parameters/ActivityCursor"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityFeed"}}},"description":"The machine's activity (newest first) + total + next_cursor."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid category, from/to, or cursor."},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"A machine's Activity feed","tags":["activity"]},"parameters":[{"$ref":"#/components/parameters/MachineID"}]},"/v1/machines/{id}/egress/activity":{"get":{"description":"The hosts a `locked` machine reached or was refused, newest first, one row\nper host, result and minute. Host names only — never a path, header or\nbody. The log covers a bounded recent window kept on the machine's host\nand ends with the machine; `complete` is false whenever rows may be\nmissing. Refused calls are also copied into the Activity feed as\n`egress.blocked` (metadata: the host only) about a minute after they\nhappen, and that record outlives the machine — filter it with\n`category=egress`.\n","operationId":"getMachineEgressActivity","parameters":[{"description":"Only this result.","in":"query","name":"action","schema":{"enum":["allowed","blocked"],"type":"string"}},{"in":"query","name":"limit","schema":{"default":100,"maximum":500,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EgressLog"}}},"description":"The log."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The machine's host did not answer. Retry."}},"summary":"A locked machine's egress log","tags":["machines"]},"parameters":[{"$ref":"#/components/parameters/MachineID"}]},"/v1/machines/{id}/exec":{"post":{"deprecated":true,"description":"The synchronous exec route, retired 2026-09-29. Answers **410 `endpoint_retired`** with what to do instead (SDK 0.1.1 still calls it; both SDKs map 410 to GoneError). Upgrade the SDK to 0.1.2 or later.","operationId":"execRetired","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"401":{"$ref":"#/components/responses/Unauthorized"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Retired (`endpoint_retired`)."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Retired — use POST /v1/machines/{id}/execs","tags":["exec"]}},"/v1/machines/{id}/execs":{"get":{"description":"Newest first. This is how a client that crashed reconnects to work it\nstarted, as long as the machine is still up. The guest is the record,\nso this is empty once the machine has stopped or been destroyed. The\nActivity feed is the audit trail that outlives a machine.\n","operationId":"listExecs","parameters":[{"$ref":"#/components/parameters/Limit"},{"description":"The `next_cursor` of the previous page (an exec id — records live in the guest, not a table).","in":"query","name":"cursor","schema":{"maxLength":64,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"execs":{"items":{"$ref":"#/components/schemas/MachineExec"},"type":"array"},"next_cursor":{"$ref":"#/components/schemas/NextCursor"}},"required":["execs","next_cursor"],"type":"object"}}},"description":"The account's execs on this machine. The guest keeps at most 64, so the default page holds them all."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"List jobs on a machine","tags":["exec"]},"parameters":[{"$ref":"#/components/parameters/MachineID"}],"post":{"description":"The job primitive. Returns a **handle in milliseconds**, never a result\n— so no proxy between you and the API is holding the command. `Sandbox().run(...)`\nis start + wait on this route.\n\nRequires a **full**-scoped key or a session. The machine must be\n`running`.\n\n`timeout_sec` is the wall-clock lifetime, default 120, range 1–86400 (out\nof range is `400` — never clamped, since 2026-11-15), and it is enforced\n**inside the guest** — the only party that survives a control-plane\nrestart. Unknown fields (including `stdin`) are `400` naming the field.\n\n**You mint `exec_id`.** If this response is lost, you already hold the\nhandle and poll it. Re-sending the same id is refused with `409` rather\nthan running the command twice.\n","operationId":"startExec","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncExecRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineExec"}}},"description":"Started, and **not** finished. Poll the status route for the outcome.\n"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Nothing new was started. Branch on `code`:\n`machine_not_running` — start a stopped machine;\n`too_many_execs` — the machine already holds 16 running commands, wait\nfor one to finish (a new `exec_id` does not help);\n`exec_id_in_use` — this id already names a job, poll it;\n`machine_process_limit` / `machine_disk_full` / `machine_out_of_memory`\n— the machine itself is exhausted.\n"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"⚠ **We could not confirm the command started — it may be running.**\nThe body carries `exec_id`; poll it to find out. Do NOT treat this as\na failure and do NOT blindly retry, or you risk running the command\ntwice.\n"}},"summary":"Start a job (the command primitive)","tags":["exec"]}},"/v1/machines/{id}/execs/{execID}":{"delete":{"description":"SIGTERM to the process group, a bounded grace period, then SIGKILL. The\nfinal kill is on a timer and does not wait for the process to cooperate.\n\nRequires a **full**-scoped key. Cancelling an already-finished exec is a\nno-op and still returns `200`, so a retried cancel is safe.\n","operationId":"cancelExec","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineExec"}}},"description":"Cancelled, or already terminal. `exit_code` is `143` if SIGTERM was\nenough and `137` if it had to be killed.\n"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Cancel a job","tags":["exec"]},"get":{"description":"Asks the machine, which is the authority on whether a process is still\nthere. If the machine cannot be reached this is an error — there is no\ncontrol-plane cache to fall back on.\n","operationId":"getExec","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineExec"}}},"description":"The exec record."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Status of one job","tags":["exec"]},"parameters":[{"$ref":"#/components/parameters/MachineID"},{"$ref":"#/components/parameters/ExecID"}]},"/v1/machines/{id}/execs/{execID}/output":{"get":{"description":"Output is append-only while the command runs and frozen once it finishes,\nso a byte at a given offset never changes and you can always resume from\nwhere you stopped. Poll with `offset = next_offset` from the previous\npage.\n\n⚠ **Offsets are BYTES, and `stdout` and `stderr` are counted\nindependently.** They are separate streams; interleaving them would\ninvent an ordering that never existed.\n\n⚠ **`data` is base64**, and a page can end mid-character. Decode the\nbytes, and hold a partial tail until the next page completes it — do not\ndecode each page as text on its own.\n\n⚠ **An empty page from a RUNNING exec means \"nothing yet\", not\n\"finished\".** Stop on `eof`, never on an empty page.\n","operationId":"getExecOutput","parameters":[{"in":"query","name":"stream","schema":{"default":"stdout","enum":["stdout","stderr"],"type":"string"}},{"description":"Byte offset. 0 re-reads from the start.","in":"query","name":"offset","schema":{"default":0,"format":"int64","minimum":0,"type":"integer"}},{"description":"Maximum bytes before base64 encoding.","in":"query","name":"limit","schema":{"default":65536,"maximum":1048576,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecOutputPage"}}},"description":"One page of one stream."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The exec existed and its output is no longer retained. ⚠ Distinct\nfrom `404` on purpose — telling you it never existed would invite you\nto re-run work that already ran.\n"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Read a page of a job's output","tags":["exec"]},"parameters":[{"$ref":"#/components/parameters/MachineID"},{"$ref":"#/components/parameters/ExecID"}]},"/v1/machines/{id}/network":{"parameters":[{"$ref":"#/components/parameters/MachineID"}],"post":{"description":"Replaces the outbound policy. On a **running** machine it takes effect\nimmediately, without a restart; connections already open to a host that is\nno longer allowed are closed. On a **stopped** machine it is applied by the\nnext start. Any other state is a `409`.\n\nRequires a **full**-scoped key or a session.\n","operationId":"setMachineNetwork","requestBody":{"content":{"application/json":{"example":{"allow":["pypi.org","files.pythonhosted.org"],"network":"locked"},"schema":{"$ref":"#/components/schemas/SetNetworkRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Machine"}}},"description":"The machine, with its new policy."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The machine is not running or stopped, or changed state during the call (retry) — or the new policy would strand a bound proxy secret: opening the network, or dropping one of its hosts from `allow`. Unbind the secret first."},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The host could not apply the change, or cannot enforce `locked` yet. The previous policy is still in force. Retry."}},"summary":"Replace a machine's network policy","tags":["machines"]}},"/v1/machines/{id}/secrets":{"parameters":[{"$ref":"#/components/parameters/MachineID"}],"post":{"description":"Binds and unbinds by name. It changes what the machine's NEXT exec\nreceives; a running exec keeps its environment. At most 16 per machine. A\nname set by an exec's own `env` that is also bound is refused (`400`)\nrather than silently resolved. Each bind and unbind is recorded in the\nActivity feed (name only).\n\nBindings belong to the machine: a machine created from a preserved disk\nor a snapshot starts with none.\n\nA **proxy** secret binds only to a `locked` machine whose `allow` reaches\nevery one of the secret's `hosts` (otherwise `400`). On a running machine\nits egress path must confirm it can redeem the secret; if it cannot, the\nanswer is `503` and nothing is bound.\n\nRequires a **full**-scoped key or a session.\n","operationId":"setMachineSecrets","requestBody":{"content":{"application/json":{"example":{"bind":["ORDERS_DB_URL"],"unbind":[]},"schema":{"$ref":"#/components/schemas/SetMachineSecretsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Machine"}}},"description":"The machine, with its bound secret names."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Secrets are not enabled on this server."}},"summary":"Bind or unbind secrets on a machine","tags":["secrets"]}},"/v1/machines/{id}/snapshots":{"get":{"description":"Open to read and full keys, and to sessions. A machine you don't own is `404`, not `403`.","operationId":"listMachineSnapshots","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"next_cursor":{"$ref":"#/components/schemas/NextCursor"},"snapshots":{"items":{"$ref":"#/components/schemas/Snapshot"},"type":"array"}},"required":["snapshots","next_cursor"],"type":"object"}}},"description":"The machine's snapshots, newest first."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"List a machine's snapshots","tags":["snapshots"]},"parameters":[{"$ref":"#/components/parameters/MachineID"}],"post":{"description":"A copy-on-write ZFS snapshot of the machine's **root volume** — a snapshot is\nof a volume, not of a machine, and it captures the disk, not live memory.\nCheap to take and initially near-zero bytes; it then bills at the storage\nrate for whatever it diverges by.\n\nAt most 50 snapshots per account, and gated on a positive balance.\n\nRequires a **full**-scoped key or a session.\n","operationId":"createSnapshot","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"description":"Display label; generated when omitted","type":"string"}},"type":"object"}}},"description":"Send `{}` for a generated name — an empty body is a 400.","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}},"description":"The snapshot (poll `state` until `ready`)."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/InsufficientBalance"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict (`conflict`) — the volume is not in a state that can be snapshotted. (The per-account snapshot cap is a **400** `validation_error`.)"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Take a snapshot of the machine's root volume","tags":["snapshots"]}},"/v1/machines/{id}/start":{"parameters":[{"$ref":"#/components/parameters/MachineID"}],"post":{"description":"Boots the machine again from its preserved root volume. Gated on a positive\nwallet balance — otherwise a stop/start cycle would hand out free compute\nbetween spend-guard ticks — so a depleted account gets `409`.\n\nStopping a machine releases its memory on the host, so starting it takes\nthat memory back and can be refused when the host is full: `503`\n(`no_host_available`), retryable. The machine is left `stopped` and\nuntouched — a capacity refusal never damages it.\n\nRequires a **full**-scoped key or a session.\n","operationId":"startMachine","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Machine"}}},"description":"The machine, now `running`."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/InsufficientBalance"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict (`conflict`) — the machine is not `stopped`."},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The machine's host has no free memory for it right now (`no_host_available`). Retryable — the machine stays `stopped`."}},"summary":"Start a stopped machine","tags":["machines"]}},"/v1/machines/{id}/stop":{"parameters":[{"$ref":"#/components/parameters/MachineID"}],"post":{"description":"A soft stop: the VM is shut down but its root volume and any attached data\nvolumes are preserved, so `start` brings the same disk back. Compute\nbilling stops (a final prorated sliver is accrued at the stop instant);\nstorage keeps billing, because the disk still exists.\n\nRequires a **full**-scoped key or a session.\n","operationId":"stopMachine","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Machine"}}},"description":"The machine, now `stopped`."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The machine is not in a state that can be stopped."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Stop a machine","tags":["machines"]}},"/v1/machines/{id}/terminal-session":{"parameters":[{"$ref":"#/components/parameters/MachineID"}],"post":{"description":"Returns a short-lived, **single-use** ticket for\n`GET /v1/machines/{id}/terminal` (the interactive shell WebSocket, which is\nnot otherwise described in this spec). A browser cannot set an\n`Authorization` header on a WebSocket handshake, which is why the ticket\nexists; it is burned on first use, so a replayed one is rejected. It is\n**bound to this machine**: presented on any other machine (even one owned\nby the same account) it is refused with 401.\n\nRequires a **full**-scoped key or a session.\n","operationId":"createTerminalSession","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"machine_id":{"type":"string"},"ticket":{"description":"Single-use, ~30s TTL, valid only for this machine","type":"string"},"ws_path":{"description":"WebSocket path, e.g. /v1/machines/{id}/terminal — open it with ?ticket=\u003cticket\u003e","type":"string"}},"type":"object"}}},"description":"The ticket and the path to open it on."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Mint a single-use ticket for the terminal WebSocket","tags":["machines"]}},"/v1/machines/{id}/volume/attach":{"parameters":[{"$ref":"#/components/parameters/MachineID"}],"post":{"description":"The machine-centric half of the attach pair (`POST /v1/volumes/{id}/attach`\nis the same operation addressed from the volume). Firecracker cannot hot-add\ndrives, so **the machine must be stopped** and the volume must live on the\nsame host; the disk appears on the next start.\n\nA machine boots from exactly **one** root disk (`/dev/vda`), so attaching a\nroot volume to a machine that already has one is refused with `409` —\nunless you pass `as: \"data\"`, which mounts it as an extra drive instead.\nThat is how you read an old machine's preserved disk: keep the disk with\n`DELETE /v1/machines/{id}?preserve_storage=true`, then mount it on a\nrunning machine and copy files off it.\n\nRequires a **full**-scoped key or a session.\n","operationId":"attachVolumeToMachine","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"as":{"description":"Omit for a normal attach. `data` mounts a **root (boot) disk**\nin one of the machine's extra drive slots (`vdb`…`vdh`)\nrather than as `/dev/vda`, so the machine keeps booting from\nits own disk. Only `data` is accepted — any other value is a\n`400`, because an unrecognised value must never fall through\nas \"no opinion\" on the field that chooses between the boot\ndevice and a data slot.\n","enum":["data"],"type":"string"},"volume_id":{"format":"uuid","type":"string"}},"required":["volume_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"example":"attached","type":"string"}},"type":"object"}}},"description":"Attached."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/AttachConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Attach a volume to this machine","tags":["volumes"]}},"/v1/machines/{id}/volume/detach":{"parameters":[{"$ref":"#/components/parameters/MachineID"}],"post":{"description":"Requires the machine to be stopped, for the same reason as attach. A\ndetached root volume survives and can be re-attached to another machine.\n\nRequires a **full**-scoped key or a session.\n","operationId":"detachVolumeFromMachine","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"volume_id":{"format":"uuid","type":"string"}},"required":["volume_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"example":"available","type":"string"}},"type":"object"}}},"description":"Detached; the volume is `available` again."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/AttachConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Detach a volume from this machine","tags":["volumes"]}},"/v1/openapi.json":{"get":{"description":"The OpenAPI document you are reading, served by the binary that answers\nit — so it describes exactly the deployed API, never a neighbouring\nrelease. Revalidate with `If-None-Match`; it changes only on a deploy.\n","operationId":"getOpenAPIDocument","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"The OpenAPI 3.1 document.","headers":{"Cache-Control":{"description":"`public, max-age=300, must-revalidate`","schema":{"type":"string"}},"ETag":{"description":"Strong validator for the document.","schema":{"type":"string"}}}},"304":{"description":"Not modified — the `If-None-Match` ETag is current."},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[],"summary":"This API description, as JSON","tags":["meta"]}},"/v1/quotas":{"get":{"description":"The account's provisioning ceiling and how much of it is in use. Five\ndimensions, checked **independently** — each operation charges only what\nit consumes, so filling `storage_gb` blocks both a machine and a volume\n(both take disk) while filling `vcpus` blocks a machine but leaves\nvolumes creatable.\n\nUsage counts what is **provisioned**, not what is running: a stopped\nmachine still holds its slot, vCPU, RAM and disk. `storage_gb` counts\nevery volume including machine boot disks.\n\nA limit of `0` is a real value (provisioning suspended), not \"unlimited\".\n\nOpen to read and full keys (and sessions) — knowing your own ceiling is\nnot a privileged operation.\n","operationId":"getQuotas","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quotas"}}},"description":"Limits and usage."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Account quotas and current usage","tags":["account"]}},"/v1/secrets":{"get":{"description":"Names, custody, hosts and how many live machines each is bound to. Never a value. The whole set is returned (an account holds at most 50).","operationId":"listSecrets","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"secrets":{"items":{"$ref":"#/components/schemas/Secret"},"type":"array"}},"required":["secrets"],"type":"object"}}},"description":"The account's secrets."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Secrets are not enabled on this server."}},"summary":"List your secrets","tags":["secrets"]},"post":{"description":"Stores a named value, encrypted at rest. **The value is write-only**: no\nresponse, list or error ever returns it. Session-only (the dashboard) — an\nAPI key can bind a secret by name but cannot create, replace or delete one.\n\n`custody: \"box\"` puts the value into the environment of every exec on a\nmachine it is bound to, so the machine **can read it**. Use it for things\nthat must be local (a database URL, a signing key). ⚠ Anyone who can run\ncode on a machine with the secret bound can read it — including a\nfull-scope API key, which can bind it. Every bind is recorded in the\nActivity feed as `secret.bound`.\n\n`custody: \"proxy\"` keeps the value OUT of the machine. Its commands get a\nplaceholder (`sist_ph_` followed by 32 hex characters) in the variable\ninstead, and the machine's egress path swaps the real value in only on\nHTTPS requests to the secret's `hosts`, only in its `presentation` slot,\nand only for the optional `method` / `path_prefix`. Anywhere else the\nplaceholder is forwarded unchanged and is worthless. Responses from those\nhosts have the value masked back to the placeholder. A proxy secret binds\nonly to a `locked` machine whose `allow` already reaches every one of its\n`hosts` — a secret never opens a host by itself.\n","operationId":"createSecret","requestBody":{"content":{"application/json":{"example":{"custody":"box","name":"ORDERS_DB_URL","value":"postgres://…"},"schema":{"$ref":"#/components/schemas/CreateSecretRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}},"description":"Created. The body never contains the value."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Called with an API key instead of a session."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A secret with this name exists, or the account already holds 50."},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Secrets are not enabled on this server."}},"security":[{"SessionCookie":[]}],"summary":"Create a secret","tags":["secrets"]}},"/v1/secrets/{name}":{"delete":{"description":"Session-only. Refused with `409` while the secret is bound to any machine that is not destroyed — unbind it first. A secret is never removed from under a machine that uses it.","operationId":"deleteSecret","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"deleted":{"type":"boolean"},"name":{"type":"string"}},"type":"object"}}},"description":"Deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Called with an API key instead of a session."},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Still bound — the message names the machines."},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Secrets are not enabled on this server."}},"security":[{"SessionCookie":[]}],"summary":"Delete a secret","tags":["secrets"]},"parameters":[{"in":"path","name":"name","required":true,"schema":{"pattern":"^[A-Z_][A-Z0-9_]{0,63}$","type":"string"}}]},"/v1/secrets/{name}/rotate":{"parameters":[{"in":"path","name":"name","required":true,"schema":{"pattern":"^[A-Z_][A-Z0-9_]{0,63}$","type":"string"}}],"post":{"description":"Session-only. Box custody: machines it is bound to receive the new value on their next exec — no restart; an exec already running keeps the environment it started with. Proxy custody: every running machine it is bound to is given the new value before this returns, and stopped ones get it at their next start. If a running machine cannot be reached, the answer is `503` naming it: the new value is stored, that machine still uses the previous one, and repeating the rotate retries the delivery.","operationId":"rotateSecret","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateSecretRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"},"rotated":{"type":"boolean"}},"type":"object"}}},"description":"Rotated."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Called with an API key instead of a session."},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Secrets are not enabled on this server."}},"security":[{"SessionCookie":[]}],"summary":"Replace a secret's value","tags":["secrets"]}},"/v1/snapshots":{"get":{"description":"Every snapshot the account owns, across machines. Open to read and full keys, and to sessions.","operationId":"listSnapshots","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"next_cursor":{"$ref":"#/components/schemas/NextCursor"},"snapshots":{"items":{"$ref":"#/components/schemas/Snapshot"},"type":"array"}},"required":["snapshots","next_cursor"],"type":"object"}}},"description":"The account's snapshots, newest first."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"List all your snapshots","tags":["snapshots"]}},"/v1/snapshots/{id}":{"delete":{"description":"Refused with `409` while a machine deployed **from** this snapshot still\nexists: the clone holds a ZFS dependency on it. Delete that machine first.\n\nRequires a **full**-scoped key or a session.\n","operationId":"deleteSnapshot","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"example":"deleted","type":"string"}},"type":"object"}}},"description":"Deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A machine was deployed from this snapshot."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Delete a snapshot","tags":["snapshots"]},"get":{"description":"One of your snapshots — its state, sizes and the network policy of the machine it was taken from.","operationId":"getSnapshot","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}},"description":"The snapshot."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Get a snapshot","tags":["snapshots"]},"parameters":[{"$ref":"#/components/parameters/SnapshotID"}]},"/v1/snapshots/{id}/restore":{"parameters":[{"$ref":"#/components/parameters/SnapshotID"}],"post":{"description":"**Destructive and in place.** This is a `zfs rollback` of the origin volume,\nnot a copy: everything written after the snapshot is discarded. The machine\nmust be **stopped**.\n\nZFS cannot roll back past a newer snapshot, so if any exist the request is\nrefused rather than silently destroying them. There is deliberately no\nautomatic pre-restore safety snapshot — it would itself be newer than the\ntarget and make the rollback impossible.\n\nTo keep the current disk, take a new machine from the snapshot instead:\n`POST /v1/machines` with `snapshot_id`.\n\nRequires a **full**-scoped key or a session.\n","operationId":"restoreSnapshot","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}},"description":"The snapshot, with the rollback applied."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The machine is running, or newer snapshots exist."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Roll the origin volume back to this snapshot","tags":["snapshots"]}},"/v1/volumes":{"get":{"description":"Every volume the account owns, including `role: root` disks (the boot disk\nof a machine, which is a real, detachable volume — not a hidden one). Open\nto read and full keys, and to sessions.\n","operationId":"listVolumes","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"next_cursor":{"$ref":"#/components/schemas/NextCursor"},"volumes":{"items":{"$ref":"#/components/schemas/Volume"},"type":"array"}},"required":["volumes","next_cursor"],"type":"object"}}},"description":"The caller's volumes."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"List your volumes","tags":["volumes"]},"post":{"description":"Provisions a persistent data volume on a host with room for it. A volume\nbills storage for as long as it exists — attached or not, machine running or\nstopped — so a depleted wallet cannot create one (`409`).\n\nRequires a **full**-scoped key or a session.\n","operationId":"createVolume","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVolumeRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Volume"}}},"description":"The volume, ready to attach."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"`size_gb` outside 5..50."},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/InsufficientBalance"},"403":{"$ref":"#/components/responses/ForbiddenOrQuota"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No host has capacity for a volume this size."}},"summary":"Create a data volume","tags":["volumes"]}},"/v1/volumes/{id}":{"delete":{"description":"Destroys the volume and its backing disk. The volume must be detached, and\nit must have **no snapshots** — a snapshot's ZFS dataset is a child of its\norigin volume, so deleting underneath it would strand the snapshot. Both\ncases return `409`; delete the snapshots first.\n\nRequires a **full**-scoped key or a session.\n","operationId":"deleteVolume","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"example":"deleted","type":"string"}},"type":"object"}}},"description":"Deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Still attached, or the volume still has snapshots."},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Delete a volume","tags":["volumes"]},"parameters":[{"$ref":"#/components/parameters/VolumeID"}]},"/v1/volumes/{id}/attach":{"parameters":[{"$ref":"#/components/parameters/VolumeID"}],"post":{"deprecated":true,"description":"**Deprecated** — prefer `POST /v1/machines/{id}/volume/attach`, which\naddresses the same operation from the machine. Kept working for existing\ncallers; the machine-scoped form is the one that will be maintained.\n\nSame rules either way: the machine must be stopped and on the same host as\nthe volume.\n\nRequires a **full**-scoped key or a session.\n","operationId":"attachVolume","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"as":{"description":"Omit for a normal attach. `data` mounts a root (boot) disk in a data slot instead of as `/dev/vda` — see `POST /v1/machines/{id}/volume/attach`.","enum":["data"],"type":"string"},"machine_id":{"format":"uuid","type":"string"}},"required":["machine_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"example":"attached","type":"string"}},"type":"object"}}},"description":"Attached."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/AttachConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Attach this volume to a machine (deprecated alias)","tags":["volumes"]}},"/v1/volumes/{id}/detach":{"parameters":[{"$ref":"#/components/parameters/VolumeID"}],"post":{"deprecated":true,"description":"**Deprecated** — prefer `POST /v1/machines/{id}/volume/detach`. Requires the\nmachine to be stopped, and a **full**-scoped key or a session.\n","operationId":"detachVolume","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"machine_id":{"format":"uuid","type":"string"}},"required":["machine_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"example":"available","type":"string"}},"type":"object"}}},"description":"Detached; the volume is `available` again."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/AttachConflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Detach this volume from its machine (deprecated alias)","tags":["volumes"]}}},"security":[{"BearerApiKey":[]}],"servers":[{"description":"Sistemo Cloud (production)","url":"https://api.sistemo.io"},{"description":"Local dev stack (`make up`)","url":"http://localhost:8000"}],"tags":[{"description":"Machines (microVMs): create, stop, start, delete, and their network","name":"machines"},{"description":"Run a command inside a machine — POST /v1/machines/{id}/execs","name":"exec"},{"description":"Persistent data volumes — create, attach/detach, delete","name":"volumes"},{"description":"Named credentials bound to machines. Values are write-only: no response ever contains one.","name":"secrets"},{"description":"Point-in-time snapshots of a machine's disk: restore, or start new machines from one","name":"snapshots"},{"description":"API keys (managed from the dashboard)","name":"api-keys"},{"description":"The images a machine can be created from","name":"images"},{"description":"Prepaid wallet — balance, top-ups, usage, and the live rate card","name":"billing"},{"description":"The Activity feed: what happened on your account, when, and who did it","name":"activity"},{"description":"Your account's quotas and how much of them is in use","name":"account"},{"description":"The API describing itself","name":"meta"}]}