Errors
Error format and names.
Errors use the Resend format, so the Resend SDKs show them as { data: null, error }:
{
"name": "validation_error",
"statusCode": 422,
"message": "Invalid `subject`: Too small: expected string to have >=1 characters"
}Some errors add details: the blocking items of the pre-send review, for example.
| Name | Status | Meaning |
|---|---|---|
missing_api_key | 401 | No Authorization: Bearer header. |
restricted_api_key | 401 | The key's level does not allow this route (e.g. a signups key on /contacts). |
invalid_api_key | 403 | Unknown or revoked key, or a Resend key (re_…). |
validation_error | 422 | The body or a parameter is invalid; message names the field. |
invalid_parameter | 422 | A path id or cursor is malformed or unknown. |
missing_required_field | 422 | A required field is missing. |
presend_blocked | 422 | The pre-send review found blocking items; they are in details.items. |
not_found | 404 | No such resource in your workspace. |
invalid_state | 409 | The resource is not in a state that allows this (e.g. pausing an issue that is not sending). |
under_review | 409 | The issue is held for a quick content review by our team. |
conflict | 409 | The resource already exists, or can never be changed (e.g. a bounce suppression). |
plan_limit_reached | 403 | Your plan's limit is reached (subscribers, keys, images). |
workspace_suspended | 403 | The workspace is suspended; contact support. |
rate_limit_exceeded | 429 | Too many requests; see the ratelimit-* and retry-after headers. |
monthly_quota_exceeded | 429 | The monthly email quota of your plan is used up. |
invalid_idempotency_key | 400 | The Idempotency-Key must be 1–256 characters. |
concurrent_idempotent_requests | 409 | The same Idempotency-Key is still being processed. |
invalid_idempotent_request | 409 | The same Idempotency-Key was used with another body. |
payload_too_large | 413 | The upload is over the size limit. |
unsupported_media_type | 415 | The upload is not a PNG, JPEG, GIF or WebP image. |
application_error | 500 | Unexpected error on our side; retry later. |
service_unavailable | 503 | A dependency is temporarily unavailable; retry later. |