API / Getting started / Errors and status codes

Errors and status codes

Error response

FieldTypeMeaning
statusnumberThe HTTP status
codestringA short code for programs, e.g. token_scope_missing. Go by this
errorstringAn English description for people. The wording may change
requestIdstringThe request's ID, the same as the X-Request-ID header. Include it in a support ticket so we find your request fast

Example:

HTTP
HTTP/2 403 Forbidden
{
  "status": 403,
  "code": "token_scope_missing",
  "error": "this API token lacks the servers:power scope",
  "requestId": "3f1c9a2e-7b4d-4e8a-9c21-5d6e7f8a9b0c"
}

HTTP statuses

StatusMeaning
200Done, the answer is in the body
201Created
204Done, no body
400Invalid body or parameters
401No token, or it is wrong, revoked or expired
402Not enough money on the balance
403Not allowed for this token: scope, project, IP or spending limit
404No such project, service or object
409State conflict: the server is off, the node is full, the request is still running
413The file is over 1 MB or not text
429Too many requests, wait Retry-After seconds
503The panel or node didn't answer — retry later

Error codes

CodeStatusWhat to do
token_invalid401The token is wrong, revoked or expired — make a new one
token_route_forbidden403Not available with a token — do it in the browser
token_scope_missing403Give the token the scope named in error
token_project_forbidden403The token is limited to other projects or services
token_ip_forbidden403The request came from an address not on the token's list
token_spend_limit403The purchase would pass the token's spending limit — raise it
insufficient_balance402Top up the balance
idempotency_key_required400Add an Idempotency-Key header — see limits and retries
idempotency_in_progress409A request with this key is still running — wait
token_rate_limited429Wait Retry-After seconds
server_offline409The server isn't running
node_full409No room on the node — pick another
file_not_found404No such file or folder
file_too_large413Over 1 MB — use SFTP
path_invalid400Invalid file path
upstream_unavailable503Retry in a minute; if it persists, write to support with the requestId

When an error has no code of its own, code names the status: bad_request, forbidden, not_found, conflict and so on.