Skip to main content
1

Success Responses

Successful API calls return a 200 OK status code with a simple response format:
All successful responses include a success: true flag.
2

Error Responses

When an error occurs, the API returns an appropriate HTTP status code and a simple error response:
Error responses include a success: false flag and a message describing the error.
3

Common Error Types

HTTP Status: 401 Unauthorized
4

Error Handling

Here’s how to handle common errors in your application:
Always implement proper error handling in your application to gracefully handle API errors and provide a good user experience.

Best Practices

  1. Implement Retry Logic
    • Use exponential backoff for rate limit errors
    • Respect the Retry-After header
    • Set reasonable retry limits
  2. Handle Authentication
    • Store API keys securely
    • Rotate keys regularly
    • Monitor for unauthorized access
  3. Validate Input
    • Check parameters before sending
    • Handle validation errors gracefully
    • Provide clear error messages to users
  4. Monitor Usage
    • Track API call success rates
    • Monitor rate limit usage
    • Set up alerts for unusual patterns
For production applications, consider implementing a robust error handling system that includes logging, monitoring, and alerting.