Errors
The API uses HTTP status codes to indicate whether a request succeeded. When a request fails, the error response provides information to help you decide what to do next.
Read an error response
Error responses can contain these fields:
| Field | Meaning |
|---|---|
statusCode | The HTTP status code. |
message | A short description of the error. |
errors | Optional details about individual fields or the request. |
flexErrorCode | An optional code identifying a specific error condition. |
Use the HTTP status and documented flexErrorCode values for automated error handling. Message text is intended for people and may change.
Common status codes
| Status | What to do |
|---|---|
400 Bad Request | Check the request parameters and body. |
401 Unauthorized | Check that your API key is complete, active, and unexpired, and that the request meets its IP restrictions. |
403 Forbidden | Check the key’s permissions for the organization and operation. |
404 Not Found | Check the resource identifier. The resource may not exist or may not be visible to your key. |
409 Conflict | Inspect the error details. The request conflicts with the resource’s current state or another request. |
429 Too Many Requests | Slow down and wait before retrying. |
5xx | A server-side failure occurred. Follow the retry guidance below. |
Each endpoint documents the errors specific to that operation.
Retry requests
For rate-limit responses, wait for the number of seconds specified in the Retry-After header.
For temporary failures, retry with increasing delays and a limit on the number of attempts. Do not repeatedly send an unchanged request that requires a correction to its parameters or permissions.
A timeout or server error does not necessarily mean a write failed. Before retrying a write, follow the endpoint’s idempotency rules.
Get help
When reporting an error, include the request’s method and path, the HTTP status, and the x-request-id response header when available.
Never include your API key.