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_case names. Timestamps are RFC 3339 in UTC, with milliseconds and a Z. Durations are integers with the unit in the name (_ms, _s). Memory is memory_mb (MiB), disk disk_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-Id header (req_…), which an error's body repeats as request_id.
  • Changes answer at once with 202 and an operation. With wait=true the call waits, 60 seconds by default and 300 at most, and answers the result. A create is the exception: it waits for running by default and answers 201, or 202 with the sandbox in creating when wait is false or the wait runs out.
  • Lists take limit (50 by default, 200 at most) and an opaque cursor, 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, PATCH and DELETE takes an Idempotency-Key header, 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 is idempotency_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.