Format
An error responds with an HTTP status and always a JSON body (here with Accept-Language: en):
{
"statusCode": 422,
"name": "validation_error",
"message": "to: at least one recipient",
"error": "to: at least one recipient"
}nameis stable: it is what your code tests.messagesays which field and why, in the language of the request (Accept-Language; seven languages: French, English, Spanish, Italian, Russian, Chinese, German), withContent-Languagewhen it is translated.errorrepeats the same text.- There is no per-field error array: the first error found is returned.
The names
| Status | name | What to do |
|---|---|---|
| 400, 415, 422 | validation_error | fix the request (the message names the field): unreadable JSON, unknown field, wrong type, wrong Content-Type, invalid filter |
| 422 | invalid_attachment | attachment: base64, name, type, content_id, or unsupported path |
| 413 | message_too_large | Voaaro Cloud: message larger than the plan's maximum size (max_message_bytes); send the files as links |
| 422 | attachment_quota_exceeded | Voaaro Cloud: the plan's monthly attachment allowance is used up (attachment_bytes_per_month, attachment_bytes_used) |
| 422 | invalid_idempotency_key | Idempotency-Key of 1 to 256 ASCII characters |
| 401 | missing_api_key | add Authorization: Bearer mlk_… |
| 401 | invalid_api_key | unknown or revoked key, or inactive account |
| 401 | restricted_api_key | a full_access key is needed, a personal key with receiving, or an application key (domains, suppression list, newsletters) |
| 401 | unauthorized | sending_access key on the domains API: full_access is needed |
| 403 | invalid_access | domain outside the key, sending disabled, domain not yet verified |
| 403 | restricted_api_key | personal keys disabled, key without the send scope, or the domain's organization suspended |
| 403, 429 | plan_limit | personal key of an account on a plan: plan limit reached (recipients per message, sends per day); the body adds code, limit, plan and upgrade (a larger plan exists) |
| 403 | billing_hold | personal key of an account suspended for non-payment |
| 403 | operator_api_disabled | /organizations routes disabled: enable them in the administration |
| 403 | sender_identity_violation | personal key: a from that is not its owner's address (warning counted) |
| 403 | api_sending_suspended | API sending suspended after three warnings: an administrator must restore it |
| 400 | challenge_required | browser signup API: ask for a challenge and send the proof of work (anti-bot) |
| 403 | origin_not_allowed | browser API: add the page's origin to the form's allowed_origins (origins) |
| 404 | invalid_token | invalid unsubscribe token, or from another domain (unsubscribing) |
| 404 | not_found | not found, outside the key's scope, or unknown route |
| 405 | method_not_allowed | method not allowed on this route; the Allow header lists the allowed ones |
| 409 | conflict | the current state does not allow it (already sent, not a draft…) |
| 409 | invalid_idempotent_request | same Idempotency-Key, different request (body, path or parameters) |
| 409 | concurrent_idempotent_requests | the same request is already in progress: retry |
| 413 | payload_too_large | request body too large |
| 429 | daily_quota_exceeded | daily quota reached: wait or have the quota raised |
| 429 | rate_limit_exceeded | too many requests for the key (600 per minute) or too many webhook replays: wait Retry-After; daily sending quota of the organization reached: wait; too many invalid keys from this IP address: wait 15 minutes |
| 503 | service_unavailable | storage or dependency unavailable: retry later |
| 500 | application_error | internal error (details in the server logs) |
Always JSON
Every error response from /api/v1 has the body above, even when the request reaches no route:
| Case | Response |
|---|---|
unknown route (/api/v1/emial) | 404 not_found |
method not allowed (DELETE /api/v1/emails) | 405 method_not_allowed, with the Allow header |
| unreadable JSON, unknown field or field of the wrong type | 400 or 422 validation_error |
| body too large | 413 payload_too_large |
The HTTP status does not change from one version to the next; test it first, then name.
Retrying or not
- Retry (with the same
Idempotency-Keyfor a creation): network errors,409 concurrent_idempotent_requests,5xx. - Retry after
Retry-After:429 rate_limit_exceeded. - Do not retry as is: the other
4xx(fix the request), except429 daily_quota_exceeded, later.
The SDKs retry network errors, 429 rate_limit_exceeded and 5xx on their own, and translate the errors: {data, error} in Node, typed exceptions in Python and PHP, *voaaro.Error in Go (SDKs).