Bouncewise

Bouncewise › Guides › Resend API key permissions: full access vs sending access

Resend guide

Resend API key permissions: full access vs sending access

Updated · 3 min read

Short answer

A Resend API key has one of two permissions: full_access, which can create, delete, get and update any resource, or sending_access, which can only send emails and can be restricted to one domain. A sending_access key calling anything else gets 401 restricted_api_key, "This API key is restricted to only send emails." There is no read-only key, so a tool that lists emails, domains or suppressions needs full_access. The key value is shown once; permission and domain can be changed later in the dashboard.

  1. Open API Keys In the Resend dashboard go to API Keys and click Create API Key.
  2. Name it Use a name that says where it runs, up to 50 characters.
  3. Choose the permission Pick Sending access for code that only sends, optionally limited to one domain; pick Full access only for tools that must read or manage resources.
  4. Store it once Copy the re_ key into your secret store immediately; Resend won't show it again.

The two permissions

sending_access (Sending access)full_access (Full access)
Send emailsYesYes
Read emails, domains, suppressions, metricsNo: 401 restricted_api_keyYes
Create, update, delete resources (domains, keys, suppressions)NoYes
Restrict to one domainOptional (domain_id)Not available
Use it forYour application's send pathAdmin scripts, dashboards, monitoring

Resend's advice is to choose Sending access unless the key really needs full access. For Inboxes, a sending key can only reply, forward, create and send drafts, and a domain-restricted key only reaches inboxes on that domain.

Connect screen for adding a Resend API key
Reading emails and domains needs a full access key.

Errors that point at the key

StatusnameMessageMeaning
401restricted_api_keyThis API key is restricted to only send emails.A sending key on a non-sending endpoint
401missing_api_keyMissing API KeyNo Authorization: Bearer header
400validation_errorAPI key is invalidUnknown or deleted key, on any endpoint except sending
401validation_errorAPI key is invalidThe same on sending endpoints (also for a key that isn't active)
403restricted_api_keyAPI key is not activeKey disabled; check the API Keys page
403suspended_api_keyThis API key is suspendedContact Resend support
403(code 1010)No User-Agent header; every request needs one

Branch on name, not the status: an invalid key is 400 on read endpoints but 401 when sending.

Create a key with the right permission

In the dashboard: API Keys › Create API Key, give it a name (up to 50 characters), choose Sending access or Full access, and for sending access optionally pick a domain. Copy the key straight away: Resend shows it only once.

With the API (the calling key needs full access):

curl -X POST https://api.resend.com/api-keys \
     -H "Authorization: Bearer $RESEND_API_KEY" \
     -H "User-Agent: my-app/1.0" \
     -H "Content-Type: application/json" \
     -d '{"name": "Production sender", "permission": "sending_access", "domain_id": "'$DOMAIN_ID'"}'

The response contains id and token (re_…). Later you can change a key's name, permission and domain in the dashboard; the API can only rename it.

Least privilege when one permission must read

Because reading anything needs full_access, a monitoring tool's key can also delete domains and create keys. Keep that risk small:

  • Use separate keys per application and purpose, so logs show which key did what and you can revoke one without touching the others.
  • Give your app servers sending_access, restricted to their domain, and keep the full access key out of them.
  • Keys don't expire. Resend suggests rotating at least every 90 days: create the new key, deploy it, confirm it in the Logs page, then delete the old one. Keys unused for 30 days are flagged in the dashboard. If a key has already leaked, delete it now rather than waiting for the next rotation.
  • The API Keys page shows when each key was last used and how many requests it made, with a link to that key's logs: a quick way to spot a key you no longer need.
  • The default rate limit (10 requests a second) is per team, shared across all keys, so a busy dashboard key can slow your sender.

Questions

Does Resend have a read-only API key?

No. Keys are either full_access or sending_access, and every read endpoint needs full_access.

Can I change a Resend API key's permission later?

Yes, in the dashboard: name, permission and domain are editable. The API can only update the name, and the key value itself can never be viewed again.

Why do I get restricted_api_key when listing emails?

The key has sending_access, which can only send. Use a full_access key for GET /emails, /domains and /suppressions.

Do Resend API keys expire?

No. They stay valid until you delete them, so rotate them yourself; Resend suggests at least every 90 days.

Sources