← marketplace
engineersapisha:7d6263ed5a9dccfbmanual
resend-api
Use when sending transactional or batch emails from Node.js with Resend — including React email templates, attachments, and audiences.
Install confidence
curl --create-dirs -fsSL https://skillmake.xyz/i/resend-api -o ~/.claude/skills/resend-api/SKILL.md
Pinned content
sha:7d6263ed5a9dccfb
Generated with
manual
Source
resend.com
The file served at /api/marketplace/resend-api-7d6263ed/raw matches this hash. Inspect before install, then copy the command.
4,976 chars · ~1,244 tokens
--- name: resend-api description: Use when sending transactional or batch emails from Node.js with Resend — including React email templates, attachments, and audiences. source: https://resend.com/docs generated: 2026-07-02T18:43:14.331Z category: api audience: engineers --- ## When to use - Sending transactional emails (receipts, password resets, notifications) from a backend - Rendering email templates with React via react-email - Sending batch emails or managing contacts and audiences - Verifying sending domains and handling email webhooks ## Key concepts ### Resend client Instantiated with `new Resend(apiKey)`. All operations hang off this client: resend.emails, resend.batch, resend.domains, resend.audiences, resend.contacts. ### from address & verified domains The `from` address must use a domain you've verified in Resend (DKIM/SPF). Unverified domains can only send from the onboarding@resend.dev test sender. ### React email templates Pass a React component to the `react` field; Resend renders it to HTML server-side. Works with the react-email component library. ### Batch sending resend.batch.send() accepts an array of up to 100 email objects in one call, each delivered independently. ### Idempotency Pass an idempotencyKey in the request options to prevent duplicate sends on retries within the idempotency window. ### Webhooks Resend posts events (email.sent, email.delivered, email.bounced, email.complained, email.opened, email.clicked) signed via Svix headers for verification. ## API reference ``` const resend = new Resend(process.env.RESEND_API_KEY) ``` Create the Resend SDK client with your API key. ``` import { Resend } from 'resend'; const resend = new Resend(process.env.RESEND_API_KEY); ``` ``` resend.emails.send({ from, to, subject, html | text | react, ... }) ``` Send a single email; returns { data: { id }, error }. ``` const { data, error } = await resend.emails.send({ from: 'Acme <onboarding@acme.com>', to: ['user@example.com'], subject: 'Welcome', html: '<strong>Hello!</strong>', }); if (error) console.error(error); ``` ``` resend.emails.send({ react: <Component /> }) ``` Render a React component to HTML for the email body. ``` import { WelcomeEmail } from './emails/welcome'; await resend.emails.send({ from: 'Acme <hi@acme.com>', to: 'user@example.com', subject: 'Welcome', react: WelcomeEmail({ name: 'Ada' }), }); ``` ``` send with cc, bcc, reply_to, attachments, headers, tags ``` Add CC/BCC recipients, reply-to, file attachments, custom headers, and metadata tags. ``` await resend.emails.send({ from: 'Acme <hi@acme.com>', to: 'user@example.com', subject: 'Invoice', html: '<p>See attached</p>', attachments: [{ filename: 'invoice.pdf', content: pdfBuffer }], reply_to: 'support@acme.com', tags: [{ name: 'category', value: 'invoice' }], }); ``` ``` resend.batch.send([ email1, email2, ... ]) ``` Send up to 100 emails in a single request. ``` await resend.batch.send([ { from: 'a@acme.com', to: 'x@e.com', subject: 'Hi', html: '<p>1</p>' }, { from: 'a@acme.com', to: 'y@e.com', subject: 'Hi', html: '<p>2</p>' }, ]); ``` ``` resend.emails.send(payload, { idempotencyKey }) ``` Pass options to make a send idempotent across retries. ``` await resend.emails.send( { from: 'a@acme.com', to: 'x@e.com', subject: 'Hi', html: '<p>Hi</p>' }, { idempotencyKey: 'welcome/user_123' } ); ``` ``` resend.domains.create/list/verify, resend.audiences, resend.contacts ``` Manage sending domains, marketing audiences, and their contacts via the SDK. ``` await resend.domains.create({ name: 'acme.com' }); await resend.contacts.create({ email: 'user@e.com', audienceId: 'aud_123' }); ``` ``` resend.emails.get(id) / resend.emails.update / resend.emails.cancel ``` Retrieve a sent email's status, update a scheduled email, or cancel a scheduled send. ``` const { data } = await resend.emails.get('email_id'); await resend.emails.cancel('email_id'); ``` ## Gotchas - The `from` domain must be verified in Resend; otherwise sends fail unless you use onboarding@resend.dev for testing. - The SDK does not throw on API errors — always check the returned `error` field alongside `data`. - Free/test API keys can only send to your own verified email address until a domain is verified. - Batch send is capped at 100 emails per request, and batch does not support attachments or scheduled_at. - Verify webhooks using the Svix signature headers (svix-id, svix-timestamp, svix-signature); don't trust unsigned payloads. - Attachment content should be a Buffer or base64 string; very large attachments hit per-message size limits. - Scheduling uses scheduled_at with an ISO 8601 or natural-language time; past times send immediately. - Rate limits apply per account (default ~2 requests/sec); handle 429 responses with backoff. --- Generated by SkillMake from https://resend.com/docs on 2026-07-02T18:43:14.331Z. Verify against source before relying on details.
File: ~/.claude/skills/resend-api/SKILL.md