Learn
Errors
Every error code, what causes it and how to fix it.
Sendtern uses standard HTTP status codes. Every error body has the same shape, so you can handle them in one place.
1{
2 "name": "validation_error",
3 "message": "The from domain is not verified.",
4 "field": "from",
5 "status": 422
6}
| Status | Name | What to do |
|---|---|---|
| 400 | invalid_request | The body isn't valid JSON or a field has the wrong type |
| 401 | invalid_api_key | The key is missing, malformed or revoked |
| 403 | insufficient_permission | The key is Sending only and the endpoint needs Full access |
| 404 | not_found | The id doesn't exist in this workspace |
| 409 | idempotency_conflict | The same Idempotency-Key was used with a different body |
| 422 | validation_error | Check field. Often an unverified from domain |
| 429 | rate_limit_exceeded | Wait for Retry-After seconds, then retry |
| 500 | internal_error | Retry with the same Idempotency-Key. It's safe |
When to retry
Retry 429 and 5xx responses with exponential backoff and the same idempotency key. Never retry 4xx errors other than 429 without changing the request, the answer will be the same.