Error response format
| Field | Type | Description |
|---|---|---|
error | string | Error type identifier |
message | string | Human-readable error description |
Status codes
| Status code | Description | When it happens |
|---|---|---|
200 | Success | Request completed successfully |
400 | Bad request | Invalid parameters, malformed body, or validation failure |
401 | Unauthorized | Missing or invalid API token |
403 | Forbidden | Valid token but insufficient permissions for the resource |
404 | Not found | The requested resource doesn’t exist |
429 | Too many requests | Rate limit exceeded |
500 | Internal server error | Unexpected server-side error |
Common error scenarios
Invalid request body
Resource not found
Permission denied
Best practices
- Check status codes first - don’t rely solely on parsing the response body
- Handle 429 gracefully - implement retry logic with exponential backoff
- Log error responses - include the
errorandmessagefields for debugging - Validate inputs client-side - catch malformed requests before sending them