Skip to content

Errors

An error answers with a 4xx or 5xx status and this body:

{
"error": {
"code": "domain_not_verified",
"message": "example.com is not a verified domain of this account"
}
}

Test the code. The message is written for you, in English, and its wording can change.

Status Code Cause What to do
400 invalid_request A field is missing or has the wrong type. Read message: it names the field.
400 invalid_email An address is not valid, the subject spans several lines, or a custom header is refused. Fix the value named in message.
401 missing_api_key No Authorization: Bearer header, or a value that is not a MailPush key. Send your key in the header.
401 invalid_api_key The key does not exist or was revoked. Create a key in the dashboard.
404 email_not_found No such email for this account. Check the id and the key’s account.
413 payload_too_large The request is larger than 10 MB. Shrink the content.
422 domain_not_verified The domain of from is not verified by your account. Verify the domain.
422 template_not_found Your account has no template with the alias or id given in template. Check the alias on the template’s page in the dashboard.
422 template_not_published The template exists but has no published version. Publish it in the dashboard.
422 missing_template_data data lacks a variable the template prints. Add the names listed in message to data.
429 rate_limited More than 10 requests in a second with one key. Wait for Retry-After, 1 second, and send again.
429 daily_quota_exceeded The account reached its recipients for the day. Wait for Retry-After, or ask for a higher limit.
500 internal_error Something failed on our side. Send again with the same Idempotency-Key.

Retry rate_limited, internal_error and network failures. Send an Idempotency-Key so a retry cannot send the email twice.

Do not retry the other codes: the same request gets the same answer. daily_quota_exceeded clears at midnight UTC, and its Retry-After header gives the seconds left.

The Node.js SDK follows these rules for you.