v4

OpenAPI 3.1.02026-07-3163216290.7 KB
Email messages

Update an email message

Update fields on an email message (subject, preview text, sender, LMX content). The campaign must be in draft status. Supply expectedRevisionId matching the current contentRevisionId — the server rejects mismatched revisions with 409.

post/v1/email-messages/{emailMessageId}

Request body

expectedRevisionIdstring

The contentRevisionId you last fetched, or the emailMessageContentRevisionId you received when creating the campaign.

subjectstring
previewTextstring
fromNamestring
fromEmailstring

The email sender email address, without the team's sending domain.

replyToEmailstring

Reply-to email. Must be empty or a valid email address.

ccEmailstring

CC email address. Requires the team to have CC/BCC enabled.

bccEmailstring

BCC email address. Requires the team to have CC/BCC enabled.

languageCodestring

Language code for the email. Requires translation to be enabled for the team.

emailFormat'styled' | 'plain'

The rendering format of the email.

lmxstring

The email body serialized as LMX. Styles must be embedded in the LMX <Style /> tag.

contactPropertiesFallbacksobject

Fallback values for contact properties, keyed by property name. Per-key merge: a string value sets the fallback, a null value deletes it, and keys omitted from the map are left unchanged.

eventPropertiesFallbacksobject

Fallback values for event properties, keyed by property name. Per-key merge: a string value sets the fallback, a null value deletes it, and keys omitted from the map are left unchanged.

dataVariablesFallbacksobject

Fallback values for data variables, keyed by variable name. Per-key merge: a string value sets the fallback, a null value deletes it, and keys omitted from the map are left unchanged.

Example request

{
  "expectedRevisionId": "clrev1s10n2i3d4e5f6g7h8",
  "subject": "Spring product updates",
  "previewText": "See what's new this season",
  "fromName": "Acme Team",
  "fromEmail": "hello",
  "replyToEmail": "support@company.com",
  "emailFormat": "styled",
  "lmx": "<Paragraph>Hello, {firstName}!</Paragraph>",
  "contactPropertiesFallbacks": {
    "firstName": "there"
  }
}

Response

Email message updated.

idstring required

The ID of the email message.

campaignIdstring

The campaign this email message belongs to. Present only when the message belongs to a campaign (mutually exclusive with transactionalId).

transactionalIdstring

The transactional email this email message belongs to. Present only when the message belongs to a transactional email (mutually exclusive with campaignId).

subjectstring required

The email subject.

previewTextstring required

The email preview text.

fromNamestring required

The email sender name.

fromEmailstring required

The email sender email address, without the team's sending domain.

replyToEmailstring required

The email reply-to address.

ccEmailstring

The email CC address. Only present when set.

bccEmailstring

The email BCC address. Only present when set.

languageCodestring

Only present when set.

emailFormat'styled' | 'plain' required

The rendering format of the email.

lmxstring required

The email body serialized as LMX.

contentRevisionIdstring nullable required

The current content revision. Pass this as expectedRevisionId on your next update.

updatedAtstring date-time required
contactPropertiesFallbacksobject

Fallback values for contact properties. Only present when set.

eventPropertiesFallbacksobject

Fallback values for event properties. Only present when set.

dataVariablesFallbacksobject

Fallback values for data variables. Only present when set.

Example response

{
  "id": "cle5f7g9h1i3j5k7l9m1n3p5",
  "campaignId": "clc4m6n8p0q2r4s6t8u0v2x4",
  "subject": "Spring product updates",
  "previewText": "See what's new this season",
  "fromName": "Acme Team",
  "fromEmail": "hello",
  "replyToEmail": "support@company.com",
  "emailFormat": "styled",
  "lmx": "<Paragraph>Hello, {firstName}!</Paragraph>",
  "contentRevisionId": "clrev1s10n2i3d4e5f6g7h8",
  "updatedAt": "2025-06-29T07:47:39.370Z"
}