Bouncewise

Bouncewise › Guides › Resend API errors: validation_error, 403 and 429 explained

Resend guide

Resend API errors: validation_error, 403 and 429 explained

By the Bouncewise team · Updated · 4 min read · How we check guides

Short answer

Resend returns errors as JSON with name, message and statusCode, and the name tells you more than the status. validation_error alone covers bad fields (400), an invalid API key (400 or 401), an unverified from domain and the resend.dev testing limit (both 403). 401 restricted_api_key means a sending-only key called another endpoint, and 429 is rate_limit_exceeded (10 requests per second per team by default) or a daily or monthly quota. A 403 with error code 1010 usually means the User-Agent header is missing.

The error object

Every error body has the same three fields. This one is from Resend's pagination docs:

{
  "name": "validation_error",
  "statusCode": 422,
  "message": "The pagination limit must be a number between 1 and 100. See https://resend.com/docs/pagination for more information."
}

Branch on name, then read message: the same name appears with several statuses and many different messages. The official Node SDK doesn't throw for API errors; resend.emails.send() returns { data, error }, so check error on every call. With curl, use -i to see the status and rate-limit headers:

curl -i https://api.resend.com/emails \
     -H "Authorization: Bearer $RESEND_API_KEY" \
     -H "User-Agent: my-app/1.0" \
     -H "Content-Type: application/json" \
     -d '{"from": "Acme <[email protected]>", "to": ["[email protected]"],
          "subject": "Your receipt", "text": "Thanks!"}'

Resend error codes

StatusnameMessageFix
400validation_errorAn error was found with one or more fields in the request.The message names the field
400 / 401validation_errorAPI key is invalidCreate a new key; this one doesn't exist, was deleted or isn't active
400invalid_idempotency_keyIdempotency keys, if present, must have between 1 and 256 characters.Shorten the key
401missing_api_keyMissing API KeySend Authorization: Bearer re_…
401restricted_api_keyThis API key is restricted to only send emails.Use a full_access key for anything but sending
403restricted_api_keyAPI key is not activeCheck the key on the API Keys page
403suspended_api_keyThis API key is suspendedContact Resend support
403validation_errorTesting limit, unverified domain, domain already registered (below)See the 403 section
404not_foundThe requested endpoint does not exist.Check the URL
405method_not_allowedMethod is not allowed for the requested path.Check the HTTP method
409invalid_idempotent_requestSame idempotency key within 24 hours, different bodyUse a new key, or resend the identical body
409concurrent_idempotent_requestsThere is another request in progress with the same idempotency key.Retry later
422missing_required_fieldThe request body is missing one or more required fields.The message lists them
422invalid_attachmentAttachment must have either a `content` or `path`.Give each attachment content or a URL path
422invalid_parameterFor example, the parameter must be a valid UUIDCheck the id you passed
429rate_limit_exceededToo many requestsSlow down; see below
429daily_quota_exceededYou have exceeded your daily email sending quota.Wait for midnight UTC or upgrade
429monthly_quota_exceededYou have exceeded your monthly email sending quota.Upgrade, or turn on pay-as-you-go on a paid plan
500application_errorAn unexpected error occurred.Retry later
503service_unavailableAPI is temporarily unavailableRetry later

The list also has errors for receiving (email_above_quota), OAuth scopes (invalid_permission), inboxes, Forge domains and DNS checks (dns_lookup_failed); the errors page has them all.

validation_error: one name, several problems

Because validation_error covers so much, the status code and message decide what to do:

  • 400 with a field message: a bad value in your request, such as a malformed address or a limit outside 1–100.
  • 400 or 401 API key is invalid: the key doesn't exist, was deleted or isn't active. Read endpoints answer 400 for this, the sending endpoints 401, so don't treat 400 as "my payload is wrong" without reading the message.
  • 403 You can only send testing emails to your own email address: you're sending from [email protected] to someone other than yourself. Verify your own domain and send from it.
  • 403 The example.com domain is not verified. Please, add and verify your domain.: the from domain isn't a verified domain in this team. See Resend domain not verified.
  • 403 You have reached your contacts quota. Please upgrade your plan to send more emails.: broadcasts only, when you have more contacts than your Marketing plan allows.

Resend 403: work out which one you have

  1. Error code 1010 with a valid key: Resend's docs say a missing User-Agent header is the likely cause. Every request needs one; SDKs and most HTTP clients send it, but some serverless runtimes and hand-rolled clients don't. Add User-Agent: my-app/1.0.
  2. validation_error about testing emails or an unverified domain: a sending domain problem (above).
  3. restricted_api_key "API key is not active" or suspended_api_key: the key itself; check the API Keys page. For key types, see Resend API key permissions.

Resend rate limit and quotas: three different 429s

rate_limit_exceeded is about speed: by default 10 requests per second per team, shared by all your API keys. daily_quota_exceeded and monthly_quota_exceeded are about volume, and both sent and received emails count. The daily quota applies only to the Free plan and resets at midnight UTC, not on a rolling 24 hours.

Every response tells you where you stand (example values):

ratelimit-limit: 10
ratelimit-remaining: 0
ratelimit-reset: 1
retry-after: 1
x-resend-monthly-quota: 2841

ratelimit-reset and retry-after are in seconds; x-resend-daily-quota appears only on the Free plan. On a 429, wait retry-after seconds before the next call and send through a queue rather than in parallel bursts. For many emails at once, the batch endpoint sends up to 100 in one request. The dashboard's Logs page can be filtered to 429 responses to show when it happened.

A 429 means the API refused that request. Quota limits can also surface on emails as failed, with a reason such as reached_daily_quota in the email.failed webhook; see Resend email statuses.

Questions

What does Resend error code 1010 mean?

A 403 with code 1010 despite a valid API key usually means the request had no User-Agent header. Add one, for example User-Agent: my-app/1.0.

What is Resend's API rate limit?

10 requests per second per team by default, shared across all API keys. Resend can raise it for trusted senders on request, and the current limit is on the Settings Usage page.

Why does Resend return 422?

A required field or parameter is missing (missing_required_field, missing_required_parameter), an attachment has neither content nor path (invalid_attachment), or a parameter has the wrong format (invalid_parameter). The message names what's wrong.

Why does Resend say "API key is invalid" with a 400?

Read endpoints return 400 validation_error for a key that doesn't exist or was deleted, while sending endpoints return 401. Create a new key on the API Keys page.

Sources