The API returns standard HTTP status codes to indicate the success or failure of a request.
- 2xx codes indicate success.
- 4xx codes indicate an error with the request (e.g., invalid parameters, missing authentication, resource not found).
- 5xx codes indicate a server-side error.
Clients should always be prepared to handle 4xx
and 5xx
responses gracefully. Some errors may include an error payload with additional details to help diagnose and resolve issues.
Status Code | Error Type | Description |
---|---|---|
400 | Bad Request | The request was malformed or missing required fields. Review the request payload and parameters. |
401 | Unauthorized | Authentication failed or the user does not have permission to access the resource. Ensure your API key is valid. |
404 | Not Found | The requested resource could not be found. Verify the resource identifier or endpoint URL. |
413 | Request Entity Too Large | The payload size exceeded the allowed limit. Consider reducing the request size or batching data. |
429 | Too Many Requests | The request rate limit was exceeded. Clients should implement retry logic with exponential backoff. |
500 | Internal Server Error | A server-side error occurred while processing the request. These errors are rare—retrying the request may resolve the issue. |
- Validate requests before sending them to reduce
400
errors. - Check authentication headers and tokens for
401
responses. - Retry with backoff when encountering
429
(rate limits) or certain500
errors. - Log error payloads for debugging and support purposes.