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"Scopes
| Scope | Allows |
|---|---|
READ | All GET requests on the control plane, plus runtime /status, /stream and /health. |
READ_WRITE | Everything, 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.
| Role | Permissions |
|---|---|
OWNER | Everything, including deleting the organization and transferring ownership. At least one per organization. |
ADMIN | Manage members, API keys, spend limits and all resources. Cannot delete the organization. |
DEVELOPER | Create, change and delete pods, endpoints, templates, volumes and their own API keys. No billing access. |
BILLING | View usage, manage payment methods, invoices and spend limits. Read-only access to resources. |
VIEWER | Read-only access to resources, logs and metrics. Can create `READ` API keys only. |
See Teams & roles for how to invite members.
Authentication errors
| Status | Code | Cause |
|---|---|---|
401 | missing_api_key | No Authorization header was sent. |
401 | invalid_api_key | The key is malformed or does not exist. |
401 | revoked_api_key | The key was revoked or has expired. |
403 | insufficient_scope | The API key is READ but the request needs READ_WRITE. |
403 | insufficient_role | The key's owner does not have a team role that allows this action. |
{
"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.