New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
Reference

Error codes

How API errors and SMTP replies are reported, and what to do about each kind.

API error format

API errors are JSON with a stable code and a message. Match on the code in your logic, and show the message only to people, since wording can change.

{
  "error": { "code": "invalid_recipient", "message": "The recipient address is not valid." }
}

Retry or fix?

Errors fall into two groups. Fix the request: 4xx responses other than 429 mean something is wrong with what you sent, so retrying will fail the same way. Try again later: 429 and 5xx responses are temporary, so retry with exponential backoff and a limit on attempts.

SMTP replies

SMTP replies start with a three-digit code. 2xx means success. 4xx means a temporary failure, so the sender should retry later. 5xx means a permanent failure, so do not retry the same message to that address. Many replies add an enhanced code such as 5.1.1 that explains the cause.

Reading bounce reasons

Enhanced codes are the quickest way to understand a bounce. 5.1.1 means the mailbox does not exist. 5.2.2 means the mailbox is full. 5.7.1 means the receiving server rejected the message on policy, often because of authentication or reputation. 4.x.x codes are temporary and will be retried.

What to do with bounces

Remove addresses that hard-bounce from your list, and investigate policy rejections by checking your SPF, DKIM and DMARC setup. A rising bounce rate harms your reputation, so act on it quickly.

Status and codeMeaning
400 invalid_requestA required field is missing or malformed.
401 unauthorizedThe API key is missing or invalid.
403 forbiddenThe key lacks permission for this action.
404 not_foundThe resource does not exist.
422 invalid_recipientThe recipient address failed validation.
429 rate_limitedToo many requests. Back off and retry.
500 server_errorSomething went wrong on our side. Retry.
SMTP 4xxTemporary failure. The message will be retried.
SMTP 5xxPermanent failure. Do not retry to the same address.
Was this page helpful?Contact support

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales