Skip to content
Skip to Content

Errors

Every error code the API answers with, what it means, and what to do about it.

When a call fails, the API answers with a problem detail (RFC 9457), Content-Type: application/problem+json:

{
  "type": "https://openpanel.sh/docs/api/errors#conflict",
  "title": "Conflict",
  "status": 409,
  "code": "conflict",
  "detail": "A service named web is already in this environment."
}
Field
codeWhat went wrong, from the list below. Stable: write your code against it.
detailOne sentence for a person, saying what to change. Show it as it is; its wording can improve over time.
statusThe HTTP status, the same as the answer's.
typeA link to the code's entry on this page.
titleThe code in words.

Every answer, error or not, carries an X-Request-Id header. Keep it with the error: it is how we find the request if you ask us for help.

The CLI prints the detail and exits with 1; MCP tools return it to the AI agent as the tool's error.

400 Bad request

The request cannot be read: the body is not valid JSON, a path segment is not valid, or an Idempotency-Key is not 1 to 255 visible ASCII characters. Fix the request; sending it again unchanged fails the same way.

401 Unauthorized

No credential, or one that does not work: the Authorization header is missing or not Bearer <token>, or the key was revoked, has expired, or its creator has left the organization. The answer carries WWW-Authenticate: Bearer realm="OpenPanel". Make a new key, or sign the CLI in again; see Authentication.

403 Forbidden

The credential works but may not do this. The detail says why, for example:

  • "This API key's scope is view; this needs deploy." Use a key with a higher scope.
  • "This needs admin access, and you have deploy." Ask a project admin, the owner or an admin of the organization.
  • "This API key is limited to some projects, so it cannot do this." Use a key that is not limited to projects.
  • "This API key belongs to another organization." The OpenPanel-Organization header named another organization than the key's.
  • "API keys are made and revoked by a person: in the console under Organization settings, API keys, or with the CLI after openpanel login." Keys cannot make keys; make it as yourself, with openpanel keys create.
  • "A change made with the console's session must come from the console." Use an API key from scripts.

404 Not found

The path does not exist in the API, or the thing it names does not exist in this organization: "That service was not found." A private project you have no access to, and everything in it, also answers 404, so its existence does not leak. Check the id and the organization the call works in (GET /me).

405 Method not allowed

The path exists but does not take this method. The Allow header lists the methods it takes.

409 Conflict

The change collides with what is there: a name that is taken ("A service named web is already in this environment."), a domain someone already uses, or a retry whose first request with the same Idempotency-Key is still running. Choose another name, or wait and send the retry again.

413 Payload too large

The body is larger than 256 KB.

415 Unsupported media type

A body was sent without Content-Type: application/json.

422 Invalid request

The request is understood but a value is not allowed. The detail names the field or the rule, for example:

  • "name: Too small: expected string to have >=1 characters."
  • "A service name is up to 32 lowercase letters, digits and hyphens, starting with a letter."
  • "Turn on the load balancer to run more than one replica of a public service."
  • "This service has a volume, so it always runs as one instance. Remove the volume to use replicas or the load balancer."
  • "Choose at least one server for this service before deploying."

Change the value the sentence names and send the request again.

422 Idempotency key reused

This Idempotency-Key was already used for a different request in the last 24 hours. Use a new key for each new request; see Retries.

429 Too many requests

More than 600 requests in a minute from one API key or person, or more than 60 from one address without a working credential. Wait for the number of seconds in Retry-After, then go on. See Rate limits.

500 Internal error

Something failed on our side. The detail is a plain sentence; nothing about the failure leaves the server. Try again; if it keeps happening, write to us with the X-Request-Id.

501 Not implemented yet

The operation is in the reference but not offered yet. The detail says where to do it for now, for example "Invitations are sent from the console's Members page for now." See Not offered yet.

503 Service unavailable

A service OpenPanel depends on for this call did not answer, such as the private network's coordination when you list its devices, or is not set up on this OpenPanel, such as reading a service's runtime logs ("Runtime logs are not set up on this OpenPanel yet."). Try again in a moment, or use what the detail suggests.