Transactional API

Send published transactional templates to a recipient.

Send published transactional templates to a recipient.

Endpoint

MethodPath
POST/api/v1/transactional

Authentication

Requires an API key in the Authorization header with the transactional:send scope. Requests without a valid key carrying this scope are rejected with 401/403.

Request body

Provide either transactionalId or slug.

{
  "slug": "order-confirmation",
  "email": "john@example.com",
  "dataVariables": {
    "firstName": "John",
    "orderNumber": "ORD-12345"
  },
  "language": "en",
  "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)
  • 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"
  }
}

transactionalEmailId is the id of the send record created for this request (a transactionalSends row), not the template id. Use it to correlate with delivery webhooks.

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