/v1/emails/sendSend email
Send or schedule a transactional email. Either reference a published template via templateId, or supply your own from/subject/html/text inline.
Authentication
Requires a Bearer token (API key) in the Authorization header.
Request body
templateIdstringPublished template to use (key or UUID). When omitted, you must provide from, subject, and at least one of html or text.
tostring (email)requiredRecipient email address(es). Can be a single address or an array.
ccstring (email)CC recipient(s).
bccstring (email)BCC recipient(s).
fromstringSender address. Required without templateId; overrides the template sender when both are provided. Accepts `Sender Name <email@domain.com>` or just `email@domain.com`.
subjectstringSubject line. Required without templateId; overrides the template subject when both are provided. Supports variable substitution when using a template.
htmlstringHTML email body. Cannot be used with templateId. At least one of html or text is required when sending without a template.
textstringPlain text email body. Cannot be used with templateId. If omitted and html is provided, a plain text version is generated automatically.
replyTostring (email)Reply-to address(es). Overrides the template's reply-to when provided.
variablesobjectKey-value pairs for template variable substitution. Only used with templateId. Keys must match variables defined in the template.
scheduledAtstring (date-time)ISO 8601 datetime for scheduled delivery. If set to a future time, the email will be queued and sent at the specified time. If omitted, the email is sent immediately.
addContactbooleanWhen true, a contact record is created for the recipient if one does not already exist.
Response
200—Email sent or scheduled successfully
{
"success": true,
"id": "string",
"status": "sent"
}400—Validation error (template not found, variable errors)
{
"success": false,
"message": "string"
}403—Forbidden
{
"success": false,
"message": "string"
}500—Server error
{
"success": false,
"message": "string"
}