Getting started
- Sign up for a free account
- Verify your domain
- Create an API key
- If you want to receive emails, create a webhook
- Use the API to start sending emails or retrieving information about the emails you received
Sending Emails
Step 1: Add your domain and verify it
- Go to Domains and click Add Domain
- Enter your domain name. We recommend using a subdomain, such as
newsletter.yourdomain.comto protect your sender reputation. - Copy the DNS records shown and add them to your DNS provider.
- Wait until your domain appears as
verifiedin the Resend dashboard. It should take less than 5 minutes to verify.
Step 2: Create your API key
- Go to API Keys
- Click Create API Key
- Give it a name, and select the desired permissions.
Step 3: Send your first email
Install the SDK. For example, using npm and the Resend Node.js SDK:Test addresses
If you need, you can send emails to these special addresses to test different scenarios:| Address | Simulates |
|---|---|
[email protected] | Successful delivery |
[email protected] | Email bounce |
[email protected] | Spam complaint |
Receiving Emails
Step 1: Enable receiving on your domain
- Go to your domain in Domains
- Enable the “Receiving” toggle in the domain settings
- Add the MX record shown to your DNS provider
Any email sent to
*@yourdomain.com will be received by Resend and forwarded
to your webhook.Step 2: Set up a webhook
- Go to Webhooks
- Click “Add Webhook”
- Enter your endpoint URL
- Select the
email.receivedevent
Step 3: Handle the webhook and get the email content
Once you receive your webhook, you can call the Resend API to fetch more details.Webhooks only contain metadata (sender, recipient, subject, attachment list).
To get the actual email body and attachments, call the Receiving API using the
email_id from the webhook.app/api/events/route.ts
Further Reading
Sending Emails
Deep dive into sending features
Receiving Emails
Full guide on receiving emails
Webhooks
Get notifications when certain events happen
Managing Domains
Domain verification and settings
SDKs
Node.js, Python, Go, Ruby, PHP, and more