API Error Reference
This reference documents HTTP API error responses, their meanings, and how to handle them in your integration.Response Format
All API errors follow a consistent JSON format:HTTP Status Codes
2xx Success
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Request succeeded |
| 201 | Created | Resource created successfully |
| 204 | No Content | Request succeeded, no content returned |
4xx Client Errors
| Status | Meaning | Description |
|---|---|---|
| 400 | Bad Request | Invalid request format or parameters |
| 401 | Unauthorized | Authentication required or invalid |
| 403 | Forbidden | Authenticated but not authorized |
| 404 | Not Found | Resource doesn’t exist |
| 409 | Conflict | Resource state conflict |
| 422 | Unprocessable Entity | Validation failed |
| 429 | Too Many Requests | Rate limit exceeded |
5xx Server Errors
| Status | Meaning | Description |
|---|---|---|
| 500 | Internal Server Error | Unexpected server error |
| 502 | Bad Gateway | Upstream service error |
| 503 | Service Unavailable | Temporary unavailability |
| 504 | Gateway Timeout | Upstream service timeout |
400 Bad Request
Returned when the request is malformed or contains invalid data. Example Response:- Malformed JSON
- Missing required fields
- Invalid field types
- Invalid parameter values
401 Unauthorized
Returned when authentication is missing or invalid. Example Response:| Error | Description |
|---|---|
unauthorized | No authentication provided |
invalid_token | Token is malformed or invalid |
token_expired | Authentication token has expired |
invalid_credentials | Wrong username/password |
403 Forbidden
Returned when the user is authenticated but lacks permission. Example Response:- Accessing another organization’s resources
- Insufficient role/permissions
- Resource access restricted
- Device mismatch (fingerprint)
404 Not Found
Returned when the requested resource doesn’t exist. Example Response:- Invalid resource ID
- Resource was deleted
- Resource not yet created
- Typo in resource path
409 Conflict
Returned when the request conflicts with current resource state. Example Response:| Conflict | Description |
|---|---|
already_in_queue | User already joined this queue |
already_registered | User already registered for draw |
already_exists | Resource with this ID already exists |
concurrent_modification | Resource was modified by another request |
422 Unprocessable Entity
Returned when request data fails validation. Example Response:| Type | Description |
|---|---|
required | Field is required |
email | Must be valid email format |
min_length | Below minimum length |
max_length | Exceeds maximum length |
pattern | Doesn’t match expected pattern |
unique | Value already exists (duplicate) |
429 Too Many Requests
Returned when rate limit is exceeded. Example Response:| Endpoint Type | Limit | Window |
|---|---|---|
| Authentication | 10 | 1 minute |
| Queue entry | 5 | 10 seconds |
| General API | 100 | 1 minute |
| Webhook | 1000 | 1 minute |
500 Internal Server Error
Returned when an unexpected error occurs on the server. Example Response:requestId from the error response.
503 Service Unavailable
Returned when the service is temporarily unavailable. Example Response:- Planned maintenance
- Deployment in progress
- Capacity limits
- Upstream service issues
Database Error Codes
When database constraints are violated, specific error codes are returned.Unique Constraint Violations
Example Response:email- Email already registeredname- Name already in usesku- Product SKU already exists
Error Handling Best Practices
Global Error Handler
Retry Logic
Related Resources
- SDK Errors - SDK error reference
- Common Issues - Troubleshooting guide
- Contact Support - Get help