Errors
Our API uses standard HTTP status codes to indicate the success or failure of a request. Here’s a summary of the error codes you might encounter:
Status Code | Meaning | Description | What to do |
---|---|---|---|
400 | Bad Request | The request body contains invalid parameters. The message field in the response provides details about the specific validation errors (e.g., “to is invalid. subject can’t be blank”). | Check the request body against the API reference for the specific endpoint. Ensure all required fields are present and correctly formatted. |
401 | Unauthorized | An invalid or missing API key was provided. | Verify your API key is correct and included in the Authorization: Bearer <YOUR_API_KEY> header. |
402 | Payment Required | There’s an issue with your subscription or usage limits, such as an expired subscription, exceeding the free trial limit, or hitting the monthly email sending limit. The error field provides specific details and a link to upgrade or manage your subscription. | Check the error message for details. Visit your dashboard to review your usage. |
403 | Forbidden | Your account is suspended, usually due to high bounce or complaint rates exceeding our acceptable thresholds. The error field provides context, such as the bounce rate that triggered the suspension. | Review your email sending practices and list hygiene. And chat us to discuss the suspension and steps for reactivation. |
422 | Unprocessable Entity | An internal error occurred while processing the request. This is rare, and the error field might provide additional internal details if available. | This usually indicates a temporary issue on our end. Retry the request after a short delay. If the problem persists, please chat us with details of the request and response. |
429 | Too Many Requests | You have exceeded the API rate limit for your account. The error field indicates the issue, and the retry-after HTTP header specifies how many seconds to wait before retrying. | Implement rate limiting handling in your application. Respect the retry-after header value before sending more requests. Consider optimizing your requests or chatting us if you consistently hit the rate limit. |