v4

OpenAPI 3.1.02026-07-3163216290.7 KB
Transactional emails

Create a transactional email

Create a new transactional email. An empty draft email message is created automatically and its draftEmailMessageId is returned. Use the POST /v1/email-messages/{emailMessageId} endpoint along with the returned draftEmailMessageContentRevisionId to set subject, sender, preview text, and LMX content, then call POST /v1/transactional-emails/{transactionalId}/publish to publish the draft.

post/v1/transactional-emails

Request body

namestring required

The name of the transactional email.

transactionalGroupIdstring

The ID of the group to add this transactional email to. Defaults to the team's default group when omitted.

Example request

{
  "name": "Welcome email",
  "transactionalGroupId": "clg7n5p3q1r9s7t5u3v1w9y7"
}

Response

Transactional email created.

idstring required

The ID of the transactional email.

namestring required

The name of the transactional email.

draftEmailMessageIdstring nullable required

The ID of the draft email message.

draftEmailMessageContentRevisionIdstring nullable required

The contentRevisionId of the draft email message. Pass this as expectedRevisionId on your first update via POST /v1/email-messages/{emailMessageId}.

publishedEmailMessageIdstring nullable required

The ID of the published email message. null if there is no published version.

transactionalGroupIdstring nullable

The ID of the group this transactional email belongs to. Returned when creating a transactional email.

createdAtstring date-time required

ISO 8601 timestamp for when the transactional email was created.

updatedAtstring date-time required

ISO 8601 timestamp for when the transactional email was last updated.

dataVariablesstring[] required

Data variable names used by the published email. Empty for unpublished transactional emails.

Example response

{
  "id": "cll42l54f20i1la0lfooe3z12",
  "name": "Sign up confirmation",
  "draftEmailMessageId": "cle5f7g9h1i3j5k7l9m1n3p5",
  "publishedEmailMessageId": "cle5f7g9h1i3j5k7l9m1n3p5",
  "transactionalGroupId": "clg7n5p3q1r9s7t5u3v1w9y7",
  "createdAt": "2025-06-29T07:47:39.370Z",
  "updatedAt": "2025-06-29T07:47:39.370Z",
  "dataVariables": [
    "confirmationUrl"
  ],
  "draftEmailMessageContentRevisionId": "clrev1s10n2i3d4e5f6g7h8"
}