Send via API Email API

Email API error code reference

Look up the error codes the Email API returns, tell whether the fault is in your request or on our side, and know which codes are worth retrying.

Look up the code you received. To start from a symptom instead, see Email API troubleshooting.

Every error response has the same shape, and message is the code you look up below:

{ "success": false, "statusCode": 403, "message": "DOMAIN_NOT_VERIFIED" }

HTTP status groups

Read the first digit before the detailed code — it decides whether retrying makes sense.

StatusMeaningRetry?
202Accepted and queued. Keep the id to look it up later—
400Bad request — a field is missing or malformedNo, fix the request first
401Key is wrong or revoked, or the call comes from an IP outside the key's IP restrictionsNo
403Key is valid but not allowed to do thisNo
404The id or address was not foundNo
410The content retention window has expiredNo
413Message exceeds the size ceilingNo, reduce the size
422Valid request that cannot be processed — recipient on your suppression list (RECIPIENT_SUPPRESSED) or verified as non-existent (RECIPIENT_PLATFORM_SUPPRESSED)No
429Quota or rate limit exceededYes, wait and send again
500Fault on our sideYes, with increasing delays
503Infrastructure temporarily unavailableYes, with increasing delays

Short version: 4xx means the request is wrong, except 429. Only 429, 500 and 503 are worth retrying — retrying a 400 returns the same 400 forever.

Recipient and content errors

This whole group happens before quota is charged. A rejected message does not count against your daily or cycle allowance.

CodeHTTPWhen you get it
INVALID_TO400The to list is empty after duplicates are removed
INVALID_RECIPIENT400An address in to, cc or bcc is malformed
TOO_MANY_RECIPIENTS400to + cc + bcc exceeds 50 addresses
CONTENT_REQUIRED400Both html and text are missing. With a template, this means the template produced nothing
VALIDATION_ERROR400The request is structurally wrong. The response carries an errors field pointing at the offending field

Duplicate addresses are merged before counting, so sending to the same address twice does not push you over the limit sooner.

Attachment errors

CodeHTTPWhen you get it
INVALID_ATTACHMENT400The content field is not valid base64
TOO_MANY_ATTACHMENTS400More than 10 files in one message
INVALID_FILENAME400The filename is empty, is . or .., or exceeds 255 bytes
ATTACHMENT_TYPE_BANNED400The extension is on the blocked list — .exe, .bat, .cmd, .js, .vbs, .scr, .pif and many other executable types
MESSAGE_TOO_LARGE413The message exceeds the 25 MB ceiling. The response carries limitBytes and actualBytes so you can see by how much
ATTACHMENT_EXPIRED410Fetching an attachment after the content retention window closed

Directory paths in a filename are not rejected — the system trims to the base name first and then checks the length.

The blocked list matches on the extension, not on the file contents. To send one of these, put it in an archive, or host it for download and send a link.

Permission and domain errors

CodeHTTPWhen you get it
DOMAIN_NOT_VERIFIED403The domain in from is not active, does not exist, or belongs to a different service
DOMAIN_SCOPE_VIOLATION403The sending key is bound to a domain other than the one in from
SENDING_KEY_REQUIRED403An Account Key was used to send mail. Sending only accepts a Sending Key
ACCOUNT_KEY_REQUIRED403A sending key was used for an account management call. The two key types are not interchangeable
ACCOUNT_SUSPENDED403The service account is suspended
COMPLAINT_SUPPRESSION_LOCKED403The address reached the suppression list through a spam complaint. You cannot remove it yourself — contact support
BOUNCE_SUPPRESSION_LOCKED403The address reached the suppression list because the receiver said it does not exist. You cannot remove it yourself — contact support

Three situations, one answer

DOMAIN_NOT_VERIFIED is returned identically in three cases: the domain does not exist, the domain has not finished verification, and the domain belongs to a different service. That is deliberate — distinct answers would let outsiders probe which domains exist on the platform. Check the real status on the Sending domains screen.

Quota and system errors

CodeHTTPWhen you get itWhat to do
429429Daily or 30-day cycle quota exhausted, or too many messages in a short burstSee below
QUOTA_BACKEND_UNAVAILABLE503The quota counter is temporarily unreachableWait and send again
ENQUEUE_FAILED503The message could not be queuedWait and send again
ATTACHMENT_UPLOAD_FAILED503Storing an attachment failed. No message was created and the quota was refundedSend again
ATTACHMENT_STORAGE_UNAVAILABLE503Attachment storage is temporarily unavailableWait and send again

429 has two causes whose fixes are opposites:

  • Rate limit — wait a few seconds and send again. Your remaining daily allowance is unchanged.
  • Daily quota exhausted — retrying returns 429 until midnight no matter how often you try. Compare the sent count on the Overview screen to tell which one you are hitting.

Your account's real quota is in the Email API account quota block on the Overview screen — see Read the overview page of each service. The per-message technical ceilings are under Limits & errors in Email API → Guide in the console.

Retrying properly

For 429, 500 and 503, increase the delay between attempts instead of resending immediately: 1 second, 2 seconds, 4 seconds, 8 seconds. Retrying in a tight loop is the fastest way to lock yourself out.

Cap the number of attempts. After five failures, record the request and contact support rather than retrying forever.

A 202 means the message is queued only. The delivery outcome arrives later, on the Stats & logs screen or through a webhook.