Emails
https://api.resend.com/emailsAuthorizationheaderrequiredBearer authentication: Bearer <token>.
Idempotency-KeystringA unique identifier for the request to ensure emails are only sent once. Learn more
fromstringrequiredSender email address. To include a friendly name, use the format "Your Name <sender@domain.com>".
tostring | string[]requiredRecipient email address. For multiple addresses, send as an array of strings. Max 50.
subjectstringrequiredEmail subject.
bccstring | string[]Bcc recipient email address. For multiple addresses, send as an array of strings.
ccstring | string[]Cc recipient email address. For multiple addresses, send as an array of strings.
reply_tostring | string[]Reply-to email address. For multiple addresses, send as an array of strings.
htmlstringThe HTML version of the message.
textstringThe plain text version of the message.
templateobjectheadersobjectCustom headers to add to the email.
scheduled_atstringSchedule email to be sent later. The date should be in ISO 8601 format.
attachmentsAttachment[]tagsTag[]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.
OK
curl -X POST 'https://api.resend.com/emails' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"from": "string",
"to": "string",
"subject": "string",
"bcc": "string",
"cc": "string",
"reply_to": "string",
"html": "string",
"text": "string",
"template": {
"id": "string",
"variables": {
"variableName": "Sign up now",
"variableName2": 123
}
},
"headers": {},
"scheduled_at": "string",
"attachments": [
{
"content": "<binary>",
"filename": "string",
"path": "string",
"content_type": "string",
"content_id": "string"
}
],
"tags": [
{
"name": "string",
"value": "string"
}
],
"topic_id": "string"
}'{
"id": "string"
}