Documentation menu

What the API returns when a call fails - the error body, HTTP status codes, the full error code table, and the permission each endpoint checks.

Errors

A failed call returns a non-2xx status and a JSON body with a message:

{ "message": "Organisation ID is required." }

Errors that map to a known condition also carry a code and sometimes an action:

{
  "code": "CB001",
  "message": "Payment method required",
  "action": "Add a payment method in Billing settings."
}

message is written for a person to read. code is the one to branch on - messages get reworded, codes do not.

Status codes#

StatusMeansDo
400The body was wrong - a missing id, a bad valueFix the request; retrying will not help
401No token, or an expired oneRefresh the session token and retry once; an API key that returns this is revoked or expired
402Billing is blocking the action, or the plan does not include API keysSee Billing and Authentication
403Authenticated, but not allowedCheck the role and the permission below
404No such resource, or not yoursDo not distinguish these - the API deliberately does not
409Conflicts with what already existsUsually a duplicate name
429Rate limitedHonour Retry-After when present
5xxThe platform, not youRetry with backoff; if it persists, contact us

The default for a rejected request is 400, not 422.

Error codes#

The first letter is the service (C for console), the second the category, then a number.

Deploy#

CodeStatusMessage
CD001500Container deployment failed
CD002400Container deployment failed due to invalid configuration
CD003500Container build failed
CD004500Failed to push container image
CD005500Failed to deploy container to cloud
CD006504Deployment timed out
CD007500Failed to delete container deployment
CD010500Static site deployment failed
CD011500Static site build failed
CD012500Failed to upload static files

CD003 and CD011 are your build, not the platform - read the deployment logs.

Auth#

CodeStatusMessage
CA001401Authentication failed
CA002403You do not have permission to perform this action
CA003403You do not have access to this organisation

CA001 with an API key means the key is wrong, revoked, or expired - the API does not distinguish between them.

CA003 usually means the wrong targetOrganisationId, not a missing role. With a key it means the body named an organisation the key does not belong to; omit the field and it is filled in correctly.

Billing#

CodeStatusMessage
CB001402Payment method required
CB003402Usage limit exceeded

A 402 on every request made with an API key, rather than on one particular action, means the organisation's plan no longer includes keys - the entitlement is re-checked on each call, so a downgrade stops existing keys working. Move to a paid plan, or use the MCP server, which works on every account.

General#

CodeStatusMessage
CG001500Something went wrong
CG002400Invalid request
CG003404Resource not found
CG004409This action conflicts with existing data
CG005429Too many requests
CG006503Service temporarily unavailable

Platform services#

CodeStatusMessage
CR001503Deployment service is temporarily unavailable
CR002502Deployment service returned an error
CR003504Deployment service timed out
CS001503Database connection failed
CS002500Database operation failed
CX001502Failed to connect to GitHub
CX002502Payment service error

All of these are worth retrying with backoff. CR003 in particular does not mean the deploy failed - it means the answer was slow. Poll environment status before retrying the deploy, or you will start a second one.

Permissions#

403 with CA002 means your role in that organisation lacks the permission the endpoint checks:

PermissionEndpoints
read:projectsEvery list, get, status, logs, metrics, and activity call
create:projectsCreating applications, environments, and databases
update:projectsUpdate, scale, deploy, rollback, rename, move, domains, password rotation
delete:projectsDeleting applications, environments, and databases
read:usersListing organisation members
read:billingInvoices, usage, and payment methods
update:allOrganisation-level settings

Read your role from /api/auth/profile. An API key holds one of two access levels rather than a role: read-only maps to read:projects, deploy-and-manage adds create, update, and delete. No key holds billing or organisation permissions, so those endpoints answer 403 to every key.

Retrying safely#

Creates are not idempotent - there is no idempotency key yet, so a retried create after a timeout can leave you with two applications. On a timeout, list first and check before retrying.

Deletes and updates are safe to repeat.