Transactional API
Send published transactional templates to a recipient.
Send published transactional templates to a recipient.
Endpoint
| Method | Path |
|---|---|
POST | /api/v1/transactional |
Request body
Provide either transactionalId or slug.
{
"slug": "order-confirmation",
"email": "john@example.com",
"dataVariables": {
"firstName": "John",
"orderNumber": "ORD-12345"
},
"language": "en",
"addToAudience": true,
"attachments": [
{
"filename": "invoice.pdf",
"url": "https://example.com/invoices/12345.pdf",
"contentType": "application/pdf"
}
]
}
Fields:
transactionalIdorslug(required, one of these)email(required)dataVariables(optional object)language(optional language code, e.g.en,de,en-US)addToAudience(optional boolean)attachments(optional array) — file attachments to include with the email
Attachments
Each attachment object has the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
filename | string | Yes | The file name shown to the recipient |
content | string | One of content or url | Base64-encoded file content |
url | string | One of content or url | URL to fetch the file from |
contentType | string | No | MIME type (e.g., application/pdf, image/png) |
Limits:
- Maximum 10 attachments per email
- Maximum 10 MB total attachment size
Response
Accepted sends return queued status:
{
"data": {
"status": "queued",
"email": "john@example.com",
"transactionalEmailId": "j57...",
"slug": "order-confirmation",
"contactId": "j58...",
"contactCreated": true,
"language": "en"
}
}
Language resolution order
- Explicit
languagein request - Contact preferred language (if recipient exists)
- Template default language
- Fallback default
Validation and delivery checks
- Template must exist and be
published - Template must have rendered HTML content
- Sending domain must be verified
dataVariablesare validated against template schema when present