Skip to content
Documentation menu

Guides

Errors and limits

What an error looks like, what each code means, and the limits your plan sets.

Errors

A failed request has a non-2xx status and a JSON body. Branch on error.code, which is stable. The message is for people and its wording can change.

Example
curl -i https://app.mailbench.dev/v1/inboxes/box_missing \
  -H "Authorization: Bearer $API_KEY"

HTTP/2 404
{"success":false,"error":{"code":"not_found","message":"Inbox not found"}}

Error codes

HTTPCodeWhat it means
400invalid_body, invalid_query, invalid_name, invalid_url, invalid_cursor, invalid_index, …The request was rejected. The message says which value and why. Fix the request; retrying will not help.
400not_configuredThe feature is not set up on this server (for example, spam checking).
401unauthorizedThe API key is missing, malformed or revoked.
402limit_reachedDoing this would go over your plan, for example a second webhook on the Free plan.
402quota_reachedThe workspace has used its emails for the month. Sending over SMTP answers 552 for the same reason.
403forbiddenThe key is read-only, or your role is not enough.
403session_requiredThis needs a signed-in dashboard session. API keys cannot do it.
404not_foundNo such object in this workspace. Objects in other workspaces look the same.
404wait_timeoutThe wait ended before a matching email arrived. Not an error in your request; try again or check your app sent it.
409conflictIt already exists, for example an inbox with the same name.
429rate_limitedToo many requests. Wait the number of seconds in Retry-After.
500internal_errorSomething went wrong on our side. Retry; if it persists, contact support.
502upstream_error, …A service we depend on failed (for example the spam checker). Retry later.

Retry 429, 500 and 502 with a short, growing delay. Do not retry other 4xxerrors without changing something.

Rate limits

API requests are limited per workspace, by plan. Short bursts up to two seconds' worth of requests are allowed. Over the limit you get 429 with a Retry-After header in seconds.

PlanRequests per second
Free10
Pro30
Team100

A long-running wait counts as one request however long it stays open. Sending mail over SMTP has its own limit: each inbox accepts about ten messages a second, in bursts of up to fifty. Past that the server answers 450, which a normal mailer retries on its own.

Plan limits

PlanEmails per monthRetentionMembersWebhooks
Free2,5007 days51
Pro50,00030 daysUnlimited10
Team250,00090 daysUnlimitedUnlimited
  • Emails per month. Every message an inbox accepts counts, whether it arrives over SMTP or the API. The month is the calendar month in UTC. At the limit, SMTP answers 552 and POST /v1/inboxes/{id}/send answers 402 quota_reached. Nothing is lost that was already stored.
  • Retention. Messages older than your plan's retention are deleted, along with their attachments.
  • Going over after a downgrade. Existing members and webhooks are kept, but you cannot add more until you are back under the limit.

Message size

The SMTP server accepts messages up to 25 MB and rejects larger ones. Connect on port 587 (STARTTLS), 465 (TLS) or 2525.