Transactional API

Send published transactional templates to a recipient.

Send published transactional templates to a recipient.

Endpoint

MethodPath
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:

  • transactionalId or slug (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:

FieldTypeRequiredDescription
filenamestringYesThe file name shown to the recipient
contentstringOne of content or urlBase64-encoded file content
urlstringOne of content or urlURL to fetch the file from
contentTypestringNoMIME 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

  1. Explicit language in request
  2. Contact preferred language (if recipient exists)
  3. Template default language
  4. Fallback default

Validation and delivery checks

  • Template must exist and be published
  • Template must have rendered HTML content
  • Sending domain must be verified
  • dataVariables are validated against template schema when present