Agent Skill
2/7/2026

resend

Resend email API via curl. Use this skill to send transactional emails, manage contacts, domains, and API keys.

V
vm0
35GitHub Stars
1Views
npx skills add vm0-ai/vm0-skills

SKILL.md

Nameresend
DescriptionResend email API via curl. Use this skill to send transactional emails, manage contacts, domains, and API keys.

name: resend description: Resend email API via curl. Use this skill to send transactional emails, manage contacts, domains, and API keys. vm0_secrets:

  • RESEND_API_KEY

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

  1. Sign up at https://resend.com
  2. Go to API Keys: https://resend.com/api-keys
  3. Create a new API key

Set environment variable:

export RESEND_API_KEY="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": ["<your-recipient-email>"],
  "subject": "<your-subject>",
  "html": "<p><your-html-content></p>"
}

Then run:

bash -c 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_API_KEY" --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": ["<your-recipient-email>"],
  "subject": "<your-subject>",
  "text": "<your-plain-text-content>"
}

Then run:

bash -c 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_API_KEY" --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": ["<your-recipient-email>"],
  "cc": ["<your-cc-email>"],
  "bcc": ["<your-bcc-email>"],
  "subject": "<your-subject>",
  "html": "<p><your-html-content></p>"
}

Then run:

bash -c 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_API_KEY" --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": ["<your-recipient-email>"],
  "replyTo": "<your-reply-to-email>",
  "subject": "<your-subject>",
  "html": "<p><your-html-content></p>"
}

Then run:

bash -c 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_API_KEY" --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": ["<your-recipient-email>"],
  "subject": "<your-subject>",
  "html": "<p><your-html-content></p>",
  "scheduledAt": "in 1 hour"
}

Then run:

bash -c 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_API_KEY" --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": ["<your-recipient-1>"],
    "subject": "Hello 1",
    "html": "<p>Email 1</p>"
  },
  {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["<your-recipient-2>"],
    "subject": "Hello 2",
    "html": "<p>Email 2</p>"
  }
]

Then run:

bash -c 'curl -s -X POST "https://api.resend.com/emails/batch" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d @/tmp/resend_request.json'

Retrieve Email

bash -c 'curl -s "https://api.resend.com/emails/<your-email-id>" --header "Authorization: Bearer $RESEND_API_KEY"'

List Sent Emails

bash -c 'curl -s "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_API_KEY"'

Cancel Scheduled Email

bash -c 'curl -s -X POST "https://api.resend.com/emails/<your-email-id>/cancel" --header "Authorization: Bearer $RESEND_API_KEY"'

Contacts

Create Contact

Write to /tmp/resend_request.json:

{
  "email": "<your-contact-email>",
  "firstName": "<your-first-name>",
  "lastName": "<your-last-name>",
  "unsubscribed": false
}

Then run:

bash -c 'curl -s -X POST "https://api.resend.com/contacts" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d @/tmp/resend_request.json'

Create Contact with Custom Properties

Write to /tmp/resend_request.json:

{
  "email": "<your-contact-email>",
  "firstName": "<your-first-name>",
  "lastName": "<your-last-name>",
  "properties": {
    "company": "<your-company-name>",
    "role": "<your-role>"
  }
}

Then run:

bash -c 'curl -s -X POST "https://api.resend.com/contacts" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d @/tmp/resend_request.json'

Retrieve Contact

bash -c 'curl -s "https://api.resend.com/contacts/<your-contact-id>" --header "Authorization: Bearer $RESEND_API_KEY"'

List Contacts

bash -c 'curl -s "https://api.resend.com/contacts" --header "Authorization: Bearer $RESEND_API_KEY"'

List Contacts with Pagination

bash -c 'curl -s "https://api.resend.com/contacts?limit=50" --header "Authorization: Bearer $RESEND_API_KEY"'

Update Contact

Write to /tmp/resend_request.json:

{
  "firstName": "<your-new-first-name>",
  "unsubscribed": true
}

Then run:

bash -c 'curl -s -X PATCH "https://api.resend.com/contacts/<your-contact-id>" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d @/tmp/resend_request.json'

Delete Contact

bash -c 'curl -s -X DELETE "https://api.resend.com/contacts/<your-contact-id>" --header "Authorization: Bearer $RESEND_API_KEY"'

Domains

List Domains

bash -c 'curl -s "https://api.resend.com/domains" --header "Authorization: Bearer $RESEND_API_KEY"'

Retrieve Domain

bash -c 'curl -s "https://api.resend.com/domains/<your-domain-id>" --header "Authorization: Bearer $RESEND_API_KEY"'

Create Domain

Write to /tmp/resend_request.json:

{
  "name": "<your-domain-name>"
}

Then run:

bash -c 'curl -s -X POST "https://api.resend.com/domains" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d @/tmp/resend_request.json'

Verify Domain

bash -c 'curl -s -X POST "https://api.resend.com/domains/<your-domain-id>/verify" --header "Authorization: Bearer $RESEND_API_KEY"'

Delete Domain

bash -c 'curl -s -X DELETE "https://api.resend.com/domains/<your-domain-id>" --header "Authorization: Bearer $RESEND_API_KEY"'

API Keys

List API Keys

bash -c 'curl -s "https://api.resend.com/api-keys" --header "Authorization: Bearer $RESEND_API_KEY"'

Create API Key

Write to /tmp/resend_request.json:

{
  "name": "<your-key-name>"
}

Then run:

bash -c 'curl -s -X POST "https://api.resend.com/api-keys" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d @/tmp/resend_request.json'

Create API Key with Permissions

Write to /tmp/resend_request.json:

{
  "name": "<your-key-name>",
  "permission": "sending_access"
}

Then run:

bash -c 'curl -s -X POST "https://api.resend.com/api-keys" --header "Authorization: Bearer $RESEND_API_KEY" --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/<your-api-key-id>" --header "Authorization: Bearer $RESEND_API_KEY"'

Email Parameters Reference

ParameterTypeDescription
fromstringSender email (required). Format: "Name <email@domain.com>"
tostring[]Recipients (required). Max 50 addresses
subjectstringEmail subject (required)
htmlstringHTML content
textstringPlain text content
ccstring[]CC recipients
bccstring[]BCC recipients
replyTostringReply-to address
scheduledAtstringSchedule time (ISO 8601 or natural language)
tagsarrayCustom tags for tracking
attachmentsarrayFile attachments (max 40MB total)

Response Codes

StatusDescription
200Success
400Invalid parameters
401Missing API key
403Invalid API key
404Resource not found
429Rate limit exceeded (2 req/sec)
5xxServer error

Guidelines

  1. Rate Limits: Default is 2 requests per second; implement backoff for 429 errors
  2. Sender Domain: Use verified domains for production; onboarding@resend.dev for testing
  3. Batch Emails: Use /emails/batch for sending to multiple recipients efficiently
  4. Idempotency: Use Idempotency-Key header to prevent duplicate sends
  5. Scheduling: Use natural language (in 1 hour) or ISO 8601 format for scheduledAt

API Reference

Skills Info
Original Name:resendAuthor:vm0