Concepts
Errors
The error format and the codes the API returns.
Every error response, whatever the status code, has the same JSON body:
{
"error": {
"code": "not_found",
"message": "Server not found",
"details": {}
}
}codeis stable and machine-readable. Handle errors bycode, not bymessage.messageis a human-readable explanation. It can change.detailsis only present for some codes and carries extra fields (see below).
Common codes
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_input | The request is malformed or a value is not allowed. The message says what is wrong. |
| 401 | unauthorized | No valid token or session. |
| 402 | insufficient_funds | The balance does not cover the new resource. details: balance, required (EUR). See Billing. |
| 403 | forbidden | The token or user may not do this (for example a read token making a change, or a console-only endpoint called with a token). |
| 403 | limit_exceeded | An organization limit is reached. details: resource, limit. |
| 403 | account_suspended | The account is suspended, for example because the balance stayed negative. |
| 403 | email_not_verified | Confirm your email address first. |
| 404 | not_found | The resource does not exist in this project. |
| 405 | method_not_allowed | The endpoint does not support this HTTP method. |
| 409 | resource_busy | Another action is running on the resource. Retry when it has finished. |
| 409 | protected | The resource has delete protection. Turn it off first. |
| 409 | uniqueness_error | A resource with this name already exists. |
| 409 | resource_in_use | The resource is still used, e.g. a network with attached servers or a firewall that is applied. |
| 409 | limit_exceeded | On a load balancer type change: the services or targets don't fit the smaller type. |
| 409 | various | The resource is not in the right state, e.g. server_not_stopped, server_not_running, volume_attached, not_assigned. |
| 429 | rate_limit_exceeded | Too many requests. Wait for Retry-After seconds. See Rate limits. |
| 500 | internal_error | Something went wrong on our side. Retry later; contact support if it persists. |
| 503 | resource_unavailable | The location has no capacity or is in maintenance, or the feature is unavailable there right now. |
Errors of a failed action use the same code and message fields inside the action's
error object.