Error Handling
HTTP status codes and debugging
The API uses standard HTTP status codes to indicate success or failure. Here's what each code means:
Common Status Codes
| Status Code | Meaning | What to Check |
|---|---|---|
200 | Success | Request completed successfully |
400 | Bad Request | Check your request body format and required fields |
401 | Unauthorized | Verify your API key is correct and included in the Authorization header |
403 | Forbidden | Your API key doesn't have permission for this operation |
404 | Not Found | The resource doesn't exist or isn't accessible |
429 | Too Many Requests | You've hit the rate limit—slow down and retry |
500 | Internal Server Error | Something went wrong on our end—try again or contact support |
Error Response Format
Error responses include a message explaining what went wrong:
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Invalid API key"
}Debugging Tips
Having trouble? Here's what to check:
- Authentication issues (401): Make sure your API key is in the
Authorizationheader asBearer YOUR_API_KEY - Permission issues (403): Check your API key permissions in workspace settings
- Bad requests (400): Verify your JSON is valid and includes all required fields
- Rate limits (429): Implement exponential backoff and monitor rate limit headers