Skip to content
Docs

Errors

A refused request answers JSON with a name you can test for and a message a person can read.

The shape

The message says what happened and what to change. It never quotes an address, a subject, a body or a key you sent. Every answer, error or not, carries an x-request-id header: quote it when you write to hello@mydomainshub.com. A 429 carries retry-after, in seconds.

Every name

nameStatusWhenWhat to do
validation_error422The request is not valid: the message names each field and what is wrong with it, or the content rule that refused the email (see Limits). Also 409 (an Idempotency-Key reused for a different request, or an email that has already left the queue), 413 (a request over 4 MB) and 405 (a method the path does not take).Fix the request. Sending it again unchanged gets the same answer.
unauthorized401The API key is missing, malformed, wrong or revoked.Send Authorization: Bearer with a live key from the dashboard.
forbidden403The key may not do this: a sending key reading or changing emails, a key limited to another domain, or the sandbox refusing a recipient who is not a member. Also while a new account is still being set up for sending.Use a key with the access it needs, or the right from address. In the sandbox, send to your own members. For a new account, try again in a few minutes.
not_found404Nothing with that id belongs to this account — or the path does not exist.Check the id and that the key is this account’s.
rate_limited429More requests with this key than it may make: 10 a second, with bursts of 20.Wait for the seconds in retry-after, then send again.
quota_exceeded429The account has reached its plan’s cap for the day or the month (Lagos time) — or, rarely, our own shared sending limit; the message says which.Wait for the seconds in retry-after, or move to a larger plan.
domain_not_verified403The from address’s domain is not verified on this account.Finish the domain’s DNS records under Domains, or send from a verified domain.
account_paused403Sending is paused on this account.The dashboard says why. Email us if you think it is a mistake.
internal_error500Something failed on our side.Try again in a moment. If it keeps happening, write to us with the x-request-id.

What to send again

  • rate_limited, quota_exceeded and internal_error may succeed later: wait as retry-after says, then send again with the same Idempotency-Key, so a request that did get through is not sent twice.
  • A network error or a timeout leaves you not knowing: send again with the same key — the first answer comes back if the first request arrived.
  • Every other error needs a change to the request first.