/emailsSend an emailParameters
Idempotency-KeystringheaderA unique identifier for the request to ensure emails are only sent once. [Learn more](https://resend.com/docs/dashboard/emails/idempotency-keys)
Request body
application/json
attachmentsarray of objectShow child attributes
Show array items
contentstring · binaryContent of an attached file.
content_idstringContent ID for embedding inline images using cid references (e.g., cid:image001).
content_typestringOptional content type for the attachment, if not set it will be derived from the filename property
filenamestringName of attached file.
pathstringPath where the attachment file is hosted
bccvalueBcc recipient email address. For multiple addresses, send as an array of strings.
Show child attributes
oneOf · 2 options
ccvalueCc recipient email address. For multiple addresses, send as an array of strings.
Show child attributes
oneOf · 2 options
fromstringrequiredSender email address. To include a friendly name, use the format "Your Name <sender@domain.com>".
headersobjectCustom headers to add to the email.
htmlstringThe HTML version of the message.
reply_tovalueReply-to email address. For multiple addresses, send as an array of strings.
Show child attributes
oneOf · 2 options
scheduled_atstringSchedule email to be sent later. The date should be in ISO 8601 format.
subjectstringrequiredEmail subject.
tagsarray of objectShow child attributes
Show array items
namestringThe 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.
valuestringThe 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.
templatevalueShow child attributes
allOf · 2 options
idstringrequiredThe id of the published email template.
variablesobjectTemplate variables object with key/value pairs.
Use a published template to send the email. If provided, do not include html or text.
textstringThe plain text version of the message.
tovaluerequiredRecipient email address. For multiple addresses, send as an array of strings. Max 50.
Show child attributes
oneOf · 2 options
topic_idstringThe topic ID to scope the email to. If the recipient is a contact and opted-in to the topic, the email is sent. If opted-out, the email is not sent. If the recipient is not a contact, the email is sent if the topic's default subscription is opt_in.
{
"attachments": [
{
"content": "binary",
"content_id": "string",
"content_type": "string",
"filename": "string",
"path": "string"
}
],
"bcc": "string",
"cc": "string",
"from": "string",
"headers": {},
"html": "string",
"reply_to": "string",
"scheduled_at": "string",
"subject": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"template": {
"id": "string",
"variables": {
"variableName": "Sign up now",
"variableName2": 123
}
},
"text": "string",
"to": "string",
"topic_id": "string"
}Responses
idstringThe ID of the sent email.
{
"id": "string"
}