Skip to main content
The Compute API uses standard HTTP status codes and JSON error responses. When a request fails, check the status code first. It tells you the broad type of problem. Then read the response body for the specific message, request path, and timestamp.
An error response does not always mean the API is unavailable. Many errors mean the request needs a different token, parameter, resource ID, or retry strategy. Check the endpoint reference for errors documented on a specific endpoint.

Error response format

Error responses use a standard JSON format. A typical error response looks like this:
Validation errors may include more than one message:

Error fields

When you contact support about an API error, include the endpoint, status code, timestamp, and a safe version of the error message. Don’t include your API token.

Common status codes

Not every endpoint returns every status code. Check the API reference for the errors documented for a specific endpoint.

Handle validation errors

A 400 Bad Request usually means the API understood the request, but one or more values were not valid. For example, a GET /instances request may fail if status does not match one of the supported filter values:
The response may look like this:
To fix validation errors:
  • Check the exact parameter name.
  • Check the value format.
  • Check allowed enum values.
  • Check UUID and date-time formatting.
  • Remove optional parameters until the request works, then add them back one by one.

Handle authentication errors

A 401 Unauthorized response means the request did not include a valid token. Check that the request includes the Authorization header:
Then check these common issues:
  • The header is missing.
  • Bearer is misspelled.
  • The token was copied with extra spaces.
  • The token is expired, revoked, or invalid.
  • The request is being sent from a tool that strips headers.
    Do not put API tokens in URLs. URLs can be stored in browser history, server logs, proxy logs, and shared screenshots.

Handle not found errors

A 404 Not Found response means the requested resource could not be found. For API users, this can mean one of two things:
  • The resource does not exist.
  • The resource exists, but your token cannot access it.
For example, GET /instances/{id} may return 404 if the instance ID is wrong, or if the instance is not visible to the user or organization linked to the token. When you see a 404:
  • Check the resource ID.
  • Confirm you are using the right environment and base URL.
  • Confirm the token can access the expected account or organization.

Handle conflict errors

A 409 Conflict means the request cannot be completed because the resource is not in the right state for that action. This is most relevant for actions that change resources, such as starting or terminating an instance. For example, an action may fail if the resource is already changing state, already terminated, or not ready for the requested operation. When you see a 409:
1

Fetch the latest resource state

Call the relevant GET endpoint again and check the current status.
2

Confirm the action is still valid

Make sure the resource can still accept the action you want to run.
3

Wait if the resource is changing state

If the resource is starting, stopping, or terminating, wait before trying again.
4

Retry only when safe

Retry once you know the action is still valid and won’t cause an unwanted change.

Handle rate limits

A 429 Too Many Requests response means your client sent too many requests in a short time. If the response includes a Retry-After header, wait that many seconds before sending another request. Example response header:
A rate limit response may look like this:
For scripts and integrations, add retry logic with a short delay instead of retrying immediately in a tight loop.

Retry safely

Some requests are safer to retry than others.
Be careful retrying destructive actions. Before retrying a terminate request, fetch the resource state and confirm you still want to continue.

Build simple retry behavior

A safe retry flow looks like this:
1

Check the status code

Use the status code to decide whether the request can be retried.
2

Fix request errors first

For 400, 401, and 403, change the request or access setup before retrying.
3

Respect rate limit

For 429, wait for the Retry-After value when it is included.
4

Pause before retrying server errors

For 500 or higher, wait before retrying instead of sending repeated requests immediately.
5

Check resource state after actions

For actions that change resources, fetch the resource again before deciding whether another request is needed. For instances, use GET /instances/{id}.

What to include when asking for help

If you need help with an API error, include:
  • The HTTP status code
  • The response message
  • The response timestamp
  • The response path
  • Whether the request worked before
  • What changed before the error started
Never share your full API token in a support message. If you need to show a request, replace the token with a placeholder such as Bearer REDACTED.

Next step

Continue with API changelog to track changes that may affect your API integrations.