Resend email API via curl. Use this skill to send transactional emails, manage contacts, domains, and API keys.
/plugin marketplace add vm0-ai/api0/plugin install api0@api0This skill inherits all available tools. When active, it can use any tool Claude has access to.
Send transactional emails, manage contacts, and domains via Resend's REST API.
Official docs: https://resend.com/docs/api-reference/introduction
Use this skill when you need to:
Set environment variable:
export RESEND_API_KEY="re_xxxxxxxxx"
Important: When using
$VARin a command that pipes to another command, wrap the command containing$VARinbash -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.
bash -c 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d '"'"'{"from": "Acme <onboarding@resend.dev>", "to": ["{recipient-email}"], "subject": "{subject}", "html": "<p>{html-content}</p>"}'"'"'' | jq .
bash -c 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d '"'"'{"from": "Acme <onboarding@resend.dev>", "to": ["{recipient-email}"], "subject": "{subject}", "text": "{plain-text-content}"}'"'"'' | jq .
bash -c 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d '"'"'{"from": "Acme <onboarding@resend.dev>", "to": ["{recipient-email}"], "cc": ["{cc-email}"], "bcc": ["{bcc-email}"], "subject": "{subject}", "html": "<p>{html-content}</p>"}'"'"'' | jq .
bash -c 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d '"'"'{"from": "Acme <onboarding@resend.dev>", "to": ["{recipient-email}"], "replyTo": "{reply-to-email}", "subject": "{subject}", "html": "<p>{html-content}</p>"}'"'"'' | jq .
Schedule email using natural language or ISO 8601 format:
bash -c 'curl -s -X POST "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d '"'"'{"from": "Acme <onboarding@resend.dev>", "to": ["{recipient-email}"], "subject": "{subject}", "html": "<p>{html-content}</p>", "scheduledAt": "in 1 hour"}'"'"'' | jq .
Send up to 100 emails in a single request:
bash -c 'curl -s -X POST "https://api.resend.com/emails/batch" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d '"'"'[{"from": "Acme <onboarding@resend.dev>", "to": ["{recipient-1}"], "subject": "Hello 1", "html": "<p>Email 1</p>"}, {"from": "Acme <onboarding@resend.dev>", "to": ["{recipient-2}"], "subject": "Hello 2", "html": "<p>Email 2</p>"}]'"'"'' | jq .
bash -c 'curl -s "https://api.resend.com/emails/{email-id}" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
bash -c 'curl -s "https://api.resend.com/emails" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
bash -c 'curl -s -X POST "https://api.resend.com/emails/{email-id}/cancel" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
bash -c 'curl -s -X POST "https://api.resend.com/contacts" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d '"'"'{"email": "{contact-email}", "firstName": "{first-name}", "lastName": "{last-name}", "unsubscribed": false}'"'"'' | jq .
bash -c 'curl -s -X POST "https://api.resend.com/contacts" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d '"'"'{"email": "{contact-email}", "firstName": "{first-name}", "lastName": "{last-name}", "properties": {"company": "{company-name}", "role": "{role}"}}'"'"'' | jq .
bash -c 'curl -s "https://api.resend.com/contacts/{contact-id}" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
bash -c 'curl -s "https://api.resend.com/contacts" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
bash -c 'curl -s "https://api.resend.com/contacts?limit=50" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
bash -c 'curl -s -X PATCH "https://api.resend.com/contacts/{contact-id}" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d '"'"'{"firstName": "{new-first-name}", "unsubscribed": true}'"'"'' | jq .
bash -c 'curl -s -X DELETE "https://api.resend.com/contacts/{contact-id}" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
bash -c 'curl -s "https://api.resend.com/domains" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
bash -c 'curl -s "https://api.resend.com/domains/{domain-id}" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
bash -c 'curl -s -X POST "https://api.resend.com/domains" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d '"'"'{"name": "{domain-name}"}'"'"'' | jq .
bash -c 'curl -s -X POST "https://api.resend.com/domains/{domain-id}/verify" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
bash -c 'curl -s -X DELETE "https://api.resend.com/domains/{domain-id}" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
bash -c 'curl -s "https://api.resend.com/api-keys" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
bash -c 'curl -s -X POST "https://api.resend.com/api-keys" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d '"'"'{"name": "{key-name}"}'"'"'' | jq .
bash -c 'curl -s -X POST "https://api.resend.com/api-keys" --header "Authorization: Bearer $RESEND_API_KEY" --header "Content-Type: application/json" -d '"'"'{"name": "{key-name}", "permission": "sending_access"}'"'"'' | jq .
bash -c 'curl -s -X DELETE "https://api.resend.com/api-keys/{api-key-id}" --header "Authorization: Bearer $RESEND_API_KEY"' | jq .
| 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) |
| 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 |
onboarding@resend.dev for testing/emails/batch for sending to multiple recipients efficientlyIdempotency-Key header to prevent duplicate sendsin 1 hour) or ISO 8601 format for scheduledAt