Docs / API reference

Authentication

Every request is authenticated with an API key sent as a bearer token. Keys belong to a user inside an organization and act with that user's permissions, capped by the key's scope.

Bearer tokens

Send the key in the Authorization header. Keys start with ak_live_. We recommend storing the key in the APIPODS_API_KEY environment variable, which the SDKs and CLI read automatically.

$ export APIPODS_API_KEY="ak_live_4f9c…"
$ curl https://api.apipods.com/v1/pods \
  -H "Authorization: Bearer $APIPODS_API_KEY"
Warning: API keys grant access to your organization's resources and balance. Never embed a key in a browser or mobile app. Call your serverless endpoints from your own backend instead.

Scopes

ScopeAllows
READAll GET requests on the control plane, plus runtime /status, /stream and /health.
READ_WRITEEverything, including creating and deleting resources and submitting jobs with /run, /runsync, /cancel, /retry and /purge-queue.

A READ key that calls a write endpoint gets 403 insufficient_scope. Use READ keys for dashboards, monitoring and CI checks.

Keys and team roles

A key can never do more than the user who created it. If a user's role is lowered or they leave the organization, their keys lose the corresponding permissions immediately (or are revoked, when the user is removed). Requests that the role does not allow fail with 403 insufficient_role.

RolePermissions
OWNEREverything, including deleting the organization and transferring ownership. At least one per organization.
ADMINManage members, API keys, spend limits and all resources. Cannot delete the organization.
DEVELOPERCreate, change and delete pods, endpoints, templates, volumes and their own API keys. No billing access.
BILLINGView usage, manage payment methods, invoices and spend limits. Read-only access to resources.
VIEWERRead-only access to resources, logs and metrics. Can create `READ` API keys only.

See Teams & roles for how to invite members.

Authentication errors

StatusCodeCause
401missing_api_keyNo Authorization header was sent.
401invalid_api_keyThe key is malformed or does not exist.
401revoked_api_keyThe key was revoked or has expired.
403insufficient_scopeThe API key is READ but the request needs READ_WRITE.
403insufficient_roleThe key's owner does not have a team role that allows this action.
401 Unauthorized
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "The API key provided is not valid.",
    "param": null,
    "requestId": "req_4x8m2k9q7w3tnc"
  }
}

Creating and rotating keys

Create keys in the console under Settings → API keys or through the API keys endpoints. The full secret is shown only once. Rotating a key issues a new secret and keeps the old one working for 24 hours so you can roll it out without downtime. See Authentication & API keys for best practices.