1. Give the API key minimum permissions
When creating a key in Resend:
- Set Permission to Sending access (send only) — don't choose Full access
- Set Domain to this specific domain — don't choose All domains
That way, if the key ever leaks, the worst someone can do is send mail using your domain — they can't delete your domain or see anything else in your account.If you suspect a leak: delete the key in Resend, create a new one, then have your AI call set_my_credentials to swap it in (changing the sending key needs your confirmation).
2. Domain verification keeps failing
Check these in order:
- Where you added the records: wherever your domain's DNS is managed (Cloudflare, Alibaba Cloud, Tencent Cloud, etc.) is where you need to add them. Some providers want the full name (resend._domainkey.yourdomain.com), others want just the prefix (resend._domainkey) — getting this wrong will fail verification
- Cloudflare's cloud icon: the record Resend gives you must be set to gray cloud (DNS only) — an orange cloud (proxied) will keep verification from reading it
- Old and new DKIM coexisting (most common issue): if you've switched Resend accounts, or deleted and re-added the domain, the new account issues a new DKIM value. If the old resend._domainkey record is still there, you'll have two records with the same name, and verification might read the old one — delete the old one, keep only the new one
- Only one SPF record allowed: under the same name, there can only be one TXT record starting with v=spf1 — two will both fail. Merge them into a single record (combine each provider's include into one)
- Give it a moment before clicking Verify: DNS propagation can take anywhere from a few minutes to a few hours
To check this yourself (run in a terminal, replacing yourdomain.com with your real domain):
dig TXT resend._domainkey.yourdomain.com +short: should return exactly one record, matching the value shown on the Resend pagedig MX send.yourdomain.com +short: should return an address starting with feedback-smtp
3. MX conflict: added a sending record and now incoming mail breaks
Resend's MX record needs to go on the send.yourdomain.com subdomain (it only handles bounces) — not on your root domain.
- The MX record on your root domain (your domain itself) is for receiving mail: your business email, Gmail, or Cloudflare Email Routing
- If you accidentally add Resend's MX record to the root domain, incoming mail will break — delete the Resend record from the root domain and add it to the send subdomain instead
4. DMARC: bulk mail landing in spam
Since 2024, Gmail and Yahoo require domains sending bulk mail to have DMARC set up. Add a TXT record in your DNS:
- Name:
_dmarc - Value:
v=DMARC1; p=none; rua=mailto:your-email@example.com
Start with p=none (reports only, nothing gets blocked); once things look stable after a week or two, switch to p=quarantine. The site health check will flag it if this isn't set up.
5. If a message didn't go out, check here first
Have your AI call list_email_logs to check the status:
- blocked: you haven't connected your own sending domain yet, so mail to customers is being held back (a whole broadcast batch won't send)
- queued: your sending channel has hit today's limit (Resend's free plan allows 100 per day) — it'll send automatically once the limit resets, so nothing is lost
- failed: check the reason in the error field — invalid addresses won't be retried, but temporary server errors are retried automatically after a delay
- Still stuck: have your AI call
get_site_health, which lists every sending-related issue along with how to fix it