Transactional
Send transactional email
Queues a transactional email for sending. You can either:
- Provide a slug to use a saved template
- Provide subject and body to send custom content directly
Recipients:
- to can be a single email or an array of up to 50 emails
- Duplicate emails are automatically deduplicated
Attachments:
- Attachments can be provided as Base64-encoded content or URLs
- Maximum total attachment size: 40MB per email
- Any file type supported (PDFs, images, documents, etc.)
A successful response means the email was accepted for background processing. If a recipient is suppressed because of a bounce, complaint, or unsubscribe, the worker records the send as suppressed instead of delivering it.
Optionally set from (domain must be verified) and replyTo addresses. Variables can be passed to customize the email content. Nested objects and arrays are supported for repeat blocks, such as items. Returns immediately with a job ID.
post/transactional/send
Request body
Example request
{
"slug": "welcome-email",
"subscriberExternalId": "user_123",
"subject": "Welcome to our platform!",
"body": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
"preview": "Welcome to our platform",
"variables": {
"NAME": "John",
"event": {
"items": [
{
"title": "Pro plan",
"description": "Monthly subscription"
}
]
}
},
"from": "Notifications <notifications@example.com>",
"replyTo": "Support <support@example.com>",
"attachments": [
{
"filename": "invoice.pdf",
"path": "https://example.com/invoices/123.pdf"
}
]
}Response
Email queued successfully
Example response
{
"success": true,
"jobId": "job_abc123"
}