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 CodeMeaningWhat to Check
200SuccessRequest completed successfully
400Bad RequestCheck your request body format and required fields
401UnauthorizedVerify your API key is correct and included in the Authorization header
403ForbiddenYour API key doesn't have permission for this operation
404Not FoundThe resource doesn't exist or isn't accessible
429Too Many RequestsYou've hit the rate limit—slow down and retry
500Internal Server ErrorSomething 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:

  1. Authentication issues (401): Make sure your API key is in the Authorization header as Bearer YOUR_API_KEY
  2. Permission issues (403): Check your API key permissions in workspace settings
  3. Bad requests (400): Verify your JSON is valid and includes all required fields
  4. Rate limits (429): Implement exponential backoff and monitor rate limit headers

On this page