Documentation Index
Fetch the complete documentation index at: https://resend.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Instead of sending one email per HTTP request, we provide a batching endpoint that permits you to send up to 100 emails in a single API call.
Body Parameters
Sender email address.To include a friendly name, use the format "Your Name <sender@domain.com>".
to
string | string[]
required
Recipient email address. For multiple addresses, send as an array of strings. Max 50.
Bcc recipient email address. For multiple addresses, send as an array of strings.
Cc recipient email address. For multiple addresses, send as an array of strings.
Reply-to email address. For multiple addresses, send as an array of strings.
The HTML version of the message.
The plain text version of the message.
The React component used to write the message. Only available in the Node.js SDK.
Custom headers to add to the email.
The topic ID to receive the email.
- If the recipient is a contact and has opted-in to the topic, the email is sent.
- If the recipient is a contact and has opted-out of the topic, the email is not sent and will be marked as failed.
- If the recipient is not a contact, the email is sent if the topic default subscription value is set to
opt-in.
Custom data passed in key/value pairs.See examples.
Hide properties
The name of the email tag.It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-).It can contain no more than 256 characters.
The value of the email tag.It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-).It can contain no more than 256 characters.
To send using a template, provide a template object with:
id: the id or the alias of the published templatevariables: an object with a key for each variable (if applicable)
The id of the published email template. Required if template is provided. Only published templates can be used when sending emails.
Template variables object with key/value pairs.
variables: {
CTA: 'Sign up now',
CTA_LINK: 'https://example.com/signup'
}
When sending the template, the HTML will be parsed. If all the variables used in the template were provided, the email will be sent. If not, the call will throw a validation error.See the errors reference for more details or learn more about templates.
Hide properties
The key of the variable.May only contain ASCII letters (a–z, A–Z), numbers (0–9), and underscores (_). The following variable names are reserved and cannot be used: FIRST_NAME, LAST_NAME, EMAIL, UNSUBSCRIBE_URL.It can contain no more than 50 characters.
The value of the variable.Observe these technical limitations:
string: maximum length of 2,000 charactersnumber: not greater than 2^53 - 1
Add an idempotency key to prevent duplicated emails.
- Should be unique per API request
- Idempotency keys expire after 24 hours
- Have a maximum length of 256 characters
Learn more about idempotency keys →
Limitations
The attachments and scheduled_at fields are not supported yet.