- Resend Email API
- Send transactional emails, manage contacts, and domains via Resend's REST API.
- Official docs:
- https://resend.com/docs/api-reference/introduction
- When to Use
- Use this skill when you need to:
- Send transactional emails (welcome, password reset, notifications)
- Send batch emails to multiple recipients
- Manage email contacts and audiences
- Verify and manage sending domains
- Track email delivery status
- Prerequisites
- Sign up at
- https://resend.com
- Go to API Keys:
- https://resend.com/api-keys
- Create a new API key
- Set environment variable:
- export
- RESEND_TOKEN
- =
- "re_xxxxxxxxx"
- Important:
- When using
- $VAR
- in a command that pipes to another command, wrap the command containing
- $VAR
- in
- bash -c '...'
- . Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.
- Placeholders:
- Values in
- {curly-braces}
- like
- {email-id}
- are placeholders. Replace them with actual values when executing.
- Emails
- Send Email
- Write to
- /tmp/resend_request.json
- :
- {
- "from"
- :
- "Acme onboarding@resend.dev"
- ,
- "to"
- :
- [
- "
" - ]
- ,
- "subject"
- :
- "
" - ,
- "html"
- :
- "
" - }
- Then run:
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_TOKEN" --header "Content-Type: application/json" -d @/tmp/resend_request.json'
- Send Email with Plain Text
- Write to
- /tmp/resend_request.json
- :
- {
- "from"
- :
- "Acme onboarding@resend.dev"
- ,
- "to"
- :
- [
- "
" - ]
- ,
- "subject"
- :
- "
" - ,
- "text"
- :
- "
" - }
- Then run:
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_TOKEN" --header "Content-Type: application/json" -d @/tmp/resend_request.json'
- Send Email with CC/BCC
- Write to
- /tmp/resend_request.json
- :
- {
- "from"
- :
- "Acme onboarding@resend.dev"
- ,
- "to"
- :
- [
- "
" - ]
- ,
- "cc"
- :
- [
- "
" - ]
- ,
- "bcc"
- :
- [
- "
" - ]
- ,
- "subject"
- :
- "
" - ,
- "html"
- :
- "
" - }
- Then run:
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_TOKEN" --header "Content-Type: application/json" -d @/tmp/resend_request.json'
- Send Email with Reply-To
- Write to
- /tmp/resend_request.json
- :
- {
- "from"
- :
- "Acme onboarding@resend.dev"
- ,
- "to"
- :
- [
- "
" - ]
- ,
- "replyTo"
- :
- "
" - ,
- "subject"
- :
- "
" - ,
- "html"
- :
- "
" - }
- Then run:
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_TOKEN" --header "Content-Type: application/json" -d @/tmp/resend_request.json'
- Send Scheduled Email
- Schedule email using natural language or ISO 8601 format:
- Write to
- /tmp/resend_request.json
- :
- {
- "from"
- :
- "Acme onboarding@resend.dev"
- ,
- "to"
- :
- [
- "
" - ]
- ,
- "subject"
- :
- "
" - ,
- "html"
- :
- "
" - ,
- "scheduledAt"
- :
- "in 1 hour"
- }
- Then run:
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_TOKEN" --header "Content-Type: application/json" -d @/tmp/resend_request.json'
- Send Batch Emails
- Send up to 100 emails in a single request:
- Write to
- /tmp/resend_request.json
- :
- [
- {
- "from"
- :
- "Acme onboarding@resend.dev"
- ,
- "to"
- :
- [
- "
" - ]
- ,
- "subject"
- :
- "Hello 1"
- ,
- "html"
- :
- "
Email 1
" - }
- ,
- {
- "from"
- :
- "Acme onboarding@resend.dev"
- ,
- "to"
- :
- [
- "
" - ]
- ,
- "subject"
- :
- "Hello 2"
- ,
- "html"
- :
- "
Email 2
" - }
- ]
- Then run:
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/emails/batch" --header "Authorization: Bearer $RESEND_TOKEN" --header "Content-Type: application/json" -d @/tmp/resend_request.json'
- Retrieve Email
- bash
- -c
- 'curl -s "https://api.resend.com/emails/
" --header "Authorization: Bearer $RESEND_TOKEN"' - List Sent Emails
- bash
- -c
- 'curl -s "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_TOKEN"'
- Cancel Scheduled Email
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/emails/
/cancel" --header "Authorization: Bearer $RESEND_TOKEN"' - Contacts
- Create Contact
- Write to
- /tmp/resend_request.json
- :
- {
- "email"
- :
- "
" - ,
- "firstName"
- :
- "
" - ,
- "lastName"
- :
- "
" - ,
- "unsubscribed"
- :
- false
- }
- Then run:
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/contacts" --header "Authorization: Bearer $RESEND_TOKEN" --header "Content-Type: application/json" -d @/tmp/resend_request.json'
- Create Contact with Custom Properties
- Write to
- /tmp/resend_request.json
- :
- {
- "email"
- :
- "
" - ,
- "firstName"
- :
- "
" - ,
- "lastName"
- :
- "
" - ,
- "properties"
- :
- {
- "company"
- :
- "
" - ,
- "role"
- :
- "
" - }
- }
- Then run:
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/contacts" --header "Authorization: Bearer $RESEND_TOKEN" --header "Content-Type: application/json" -d @/tmp/resend_request.json'
- Retrieve Contact
- bash
- -c
- 'curl -s "https://api.resend.com/contacts/
" --header "Authorization: Bearer $RESEND_TOKEN"' - List Contacts
- bash
- -c
- 'curl -s "https://api.resend.com/contacts" --header "Authorization: Bearer $RESEND_TOKEN"'
- List Contacts with Pagination
- bash
- -c
- 'curl -s "https://api.resend.com/contacts?limit=50" --header "Authorization: Bearer $RESEND_TOKEN"'
- Update Contact
- Write to
- /tmp/resend_request.json
- :
- {
- "firstName"
- :
- "
" - ,
- "unsubscribed"
- :
- true
- }
- Then run:
- bash
- -c
- 'curl -s -X PATCH "https://api.resend.com/contacts/
" --header "Authorization: Bearer $RESEND_TOKEN" --header "Content-Type: application/json" -d @/tmp/resend_request.json' - Delete Contact
- bash
- -c
- 'curl -s -X DELETE "https://api.resend.com/contacts/
" --header "Authorization: Bearer $RESEND_TOKEN"' - Domains
- List Domains
- bash
- -c
- 'curl -s "https://api.resend.com/domains" --header "Authorization: Bearer $RESEND_TOKEN"'
- Retrieve Domain
- bash
- -c
- 'curl -s "https://api.resend.com/domains/
" --header "Authorization: Bearer $RESEND_TOKEN"' - Create Domain
- Write to
- /tmp/resend_request.json
- :
- {
- "name"
- :
- "
" - }
- Then run:
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/domains" --header "Authorization: Bearer $RESEND_TOKEN" --header "Content-Type: application/json" -d @/tmp/resend_request.json'
- Verify Domain
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/domains/
/verify" --header "Authorization: Bearer $RESEND_TOKEN"' - Delete Domain
- bash
- -c
- 'curl -s -X DELETE "https://api.resend.com/domains/
" --header "Authorization: Bearer $RESEND_TOKEN"' - API Keys
- List API Keys
- bash
- -c
- 'curl -s "https://api.resend.com/api-keys" --header "Authorization: Bearer $RESEND_TOKEN"'
- Create API Key
- Write to
- /tmp/resend_request.json
- :
- {
- "name"
- :
- "
" - }
- Then run:
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/api-keys" --header "Authorization: Bearer $RESEND_TOKEN" --header "Content-Type: application/json" -d @/tmp/resend_request.json'
- Create API Key with Permissions
- Write to
- /tmp/resend_request.json
- :
- {
- "name"
- :
- "
" - ,
- "permission"
- :
- "sending_access"
- }
- Then run:
- bash
- -c
- 'curl -s -X POST "https://api.resend.com/api-keys" --header "Authorization: Bearer $RESEND_TOKEN" --header "Content-Type: application/json" -d @/tmp/resend_request.json'
- Delete API Key
- bash
- -c
- 'curl -s -X DELETE "https://api.resend.com/api-keys/
" --header "Authorization: Bearer $RESEND_TOKEN"' - Email Parameters Reference
- Parameter
- Type
- Description
- from
- string
- Sender email (required). Format:
- "Name email@domain.com"
- to
- string[]
- Recipients (required). Max 50 addresses
- subject
- string
- Email subject (required)
- html
- string
- HTML content
- text
- string
- Plain text content
- cc
- string[]
- CC recipients
- bcc
- string[]
- BCC recipients
- replyTo
- string
- Reply-to address
- scheduledAt
- string
- Schedule time (ISO 8601 or natural language)
- tags
- array
- Custom tags for tracking
- attachments
- array
- File attachments (max 40MB total)
- Response Codes
- Status
- Description
- 200
- Success
- 400
- Invalid parameters
- 401
- Missing API key
- 403
- Invalid API key
- 404
- Resource not found
- 429
- Rate limit exceeded (2 req/sec)
- 5xx
- Server error
- Guidelines
- Rate Limits
-
- Default is 2 requests per second; implement backoff for 429 errors
- Sender Domain
-
- Use verified domains for production;
- onboarding@resend.dev
- for testing
- Batch Emails
-
- Use
- /emails/batch
- for sending to multiple recipients efficiently
- Idempotency
-
- Use
- Idempotency-Key
- header to prevent duplicate sends
- Scheduling
- Use natural language ( in 1 hour ) or ISO 8601 format for scheduledAt API Reference Documentation: https://resend.com/docs/api-reference/introduction Dashboard: https://resend.com/overview API Keys: https://resend.com/api-keys Domains: https://resend.com/domains
resend
安装
npx skills add https://github.com/vm0-ai/vm0-skills --skill resend