2xx range indicate success, 4xx codes indicate a client error, and 5xx codes indicate a server-side issue.
Status codes
| Code | Meaning | Description |
|---|---|---|
201 | Created | The resource was created successfully. |
400 | Bad Request | The request is malformed or contains invalid parameters. |
401 | Unauthorized | Authentication is missing or invalid. |
403 | Forbidden | You do not have permission to access the resource. |
404 | Not Found | The requested resource does not exist. |
409 | Conflict | The resource already exists or conflicts with the current state. |
422 | Unprocessable Entity | The request body failed validation. |
429 | Too Many Requests | You have exceeded the rate limit. See Rate Limits. |
500 | Internal Server Error | Something went wrong on our end. |
Error response shapes
The exact response shape varies slightly between endpoints. Some endpoints use an
error field, while others use a success + message pattern. Always check the HTTP status code first, then parse the response body.- 400 Bad Request
- 403 Forbidden
- 404 Not Found
- 409 Conflict
- 422 Unprocessable Entity
- 500 Internal Server Error
Best practices
- Check the HTTP status code first. The status code is the most reliable indicator of what happened. Parse the response body only after determining the status.
- Handle both error shapes. Some endpoints return
{"error": "..."}while others return{"success": false, "message": "...", "status": ...}. Your client code should handle both. - Use 422 errors for form validation. The
errorsobject gives you per-field messages you can surface directly to users. - Retry on 500 errors. Internal server errors are transient. Use exponential backoff when retrying.