v4

OpenAPI 3.1.02026-07-3163216290.7 KB
Transactional emails

Ensure a draft email message

Ensure the transactional email has a draft email message. If a draft already exists it is returned unchanged; otherwise a new empty draft is created (seeded from the most recent published version when present). Use POST /v1/email-messages/{emailMessageId} to edit the draft's content.

post/v1/transactional-emails/{transactionalId}/draft

Response

Draft ready.

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"
}