Skip to Content
Coming soon · Public API preview. Access is not open yet and the API may change. Join the waitlist.
The Thumela documentation
Errors and status codes

Errors and status codes

Non-success API responses use one shape:

{ "statusCode": 422, "name": "UnverifiedDomain", "message": "The sending domain is not verified for this organisation. Add it with POST /domains and publish the DNS records." }

Branch on the status and name; do not depend on the exact wording of message.

HTTP statusNameWhat to do
400ValidationError or BadRequestCorrect the request fields or recipient count before retrying
401UnauthorizedCheck the server-side API key; it may be missing, invalid or revoked
404NotFoundCheck the message ID and organisation; inaccessible messages also return 404
422UnverifiedDomainComplete domain verification before sending
422SuppressedDo not retry sending to that recipient unchanged
422UnsupportedTagOnly transactional email is accepted
429TooManyRequestsBack off and retry later; honour Retry-After when present
500InternalServerErrorRetry cautiously with the same idempotency key

Malformed JSON, unsupported content types and oversized requests may return other 4xx responses using the same envelope.

Network failures

A connection failure can leave you unsure whether a message was accepted. Retry the same message with the same JSON idempotencyKey within the 24-hour replay window. Use bounded retries and increasing delays.

The Node client represents transport failures as ThumelaError with statusCode: 0 and code: 'NetworkError'. See Node SDK.