Skip to main content

Create a transactional email

This creates a transactional email and a related draft email message in one request. Only a name value is required.
Save the returned draftEmailMessageContentRevisionId. Pass it as expectedRevisionId when updating the draft email message to avoid 409 Conflict errors caused by stale revisions.
API reference There is no CLI command for creating transactional emails yet — use the API below.

Query themes and components for your LMX

You can fetch your available themes and reusable components before building the lmx payload. List themes API reference CLI reference
List components API reference CLI reference

Update the draft email message with contentRevisionId

Use draftEmailMessageId from when you created the transactional as the path parameter, and pass draftEmailMessageContentRevisionId as expectedRevisionId. Apply styles or a theme in <Style />, and build the email using LMX elements. Themes and components you queried in the previous step can be referenced by their IDs.
Save the returned contentRevisionId after each update. Pass it as expectedRevisionId on the next update to avoid 409 Conflict errors caused by stale revisions.
API reference
CLI reference

Send a transactional preview

After updating the draft email message, send a test preview to one or more addresses before publishing. Transactional previews accept dataVariables for personalization. Use draftEmailMessageId from when you created the transactional as the path parameter. There is no CLI command for previews yet — use the API below. API reference

Upload an image asset

If your LMX includes <Image /> tags, upload image files with the Upload API and use the returned finalUrl as the image src. Create upload API reference
Complete upload API reference Upload CLI reference

Publish the transactional email

Publish the draft email message so it can be sent with the transactional send endpoint. There is no CLI command for publishing transactional emails yet — use the API below. API reference

Send a transactional email

Use the transactional id from create (or publish) as transactionalId in the send request. API reference
CLI reference

Send a transactional email with an array data variable

Learn more about arrays. API reference
CLI reference

Send a transactional email with attachments

You must request attachments to be enabled in your account before you can send emails with them.
API reference
CLI reference

Send a transactional email with an idempotency key

Add an Idempotency-Key header to the request to prevent duplicate requests. API reference
CLI reference

List transactional emails

API reference
CLI reference
Last modified on July 1, 2026