API reference
Pod's public API, its conventions, and every call
Pod's API is JSON over HTTPS at https://api.pod.mapier.ai, with WebSockets for streams. Version 1.0.0.
curl "https://api.pod.mapier.ai/v1/sandboxes" -H "Authorization: Bearer $POD_API_KEY"Keys
Send a key as a bearer token. A test or live key sees only its own project's sandboxes of its own mode. A few calls are for signed-in people only, from the dashboard; their pages say so.
Conventions
- JSON with
snake_casenames. Timestamps are RFC 3339 in UTC, with milliseconds and aZ. Durations are integers with the unit in the name (_ms,_s). Memory ismemory_mb(MiB), diskdisk_gb(GiB), byte counts_bytes. Usage is seconds and bytes, never money. - Ids are a prefix, an underscore and lowercase letters and digits:
sbx_…for a sandbox,op_…for an operation. An id says nothing else. - Every answer carries a
Request-Idheader (req_…), which an error's body repeats asrequest_id. - Changes answer at once with
202and an operation. Withwait=truethe call waits, 60 seconds by default and 300 at most, and answers the result. A create is the exception: it waits forrunningby default and answers201, or202with the sandbox increatingwhenwaitis false or the wait runs out. - Lists take
limit(50 by default, 200 at most) and an opaquecursor, and answer{"data": [...], "next_cursor": ...}, newest first. A list can lag a few seconds behind a get by id, which is exact. - Idempotency. Every
POST,PUT,PATCHandDELETEtakes anIdempotency-Keyheader, except calls whose answer is a secret (a stream ticket, a port token, an end-user token, a sign-up). Those take none: a key sent anyway is ignored, and asking twice makes two. Creating or forking a sandbox requires one. A repeat within 24 hours with the same key and request answers what the first call answered, without acting again. The same key with a different request isidempotency_key_reused. - Errors come from one list. Branch on the name in
error.
Calls
The calls are grouped as in the menu: sandboxes, commands, files, snapshots, operations, usage, account, billing, end users, organizations and the service itself. Each page has the call's request, its fields, its answer, its errors and the same call in the SDKs and mpod.
The sizes, counts and times the API holds you to are in Limits.