Skip to main content
POST
/
v1
/
email-messages
/
{emailMessageId}
Update an email message
curl --request POST \
  --url https://app.loops.so/api/v1/email-messages/{emailMessageId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "expectedRevisionId": "<string>",
  "subject": "<string>",
  "previewText": "<string>",
  "fromName": "<string>",
  "fromEmail": "<string>",
  "replyToEmail": "<string>",
  "lmx": "<string>"
}
'
{
  "success": true,
  "emailMessageId": "em_01hxyz",
  "campaignId": "cmp_01hxyz",
  "subject": "Big spring updates",
  "previewText": "A quick look at what's new",
  "fromName": "Loops",
  "fromEmail": "hello@news.example.com",
  "replyToEmail": "support@example.com",
  "lmx": "<Email><Text>Hello world</Text></Email>",
  "contentRevisionId": "rev_01hyza",
  "updatedAt": "2026-03-28T15:30:00.000Z"
}

Documentation Index

Fetch the complete documentation index at: https://loops.so/docs/llms.txt

Use this file to discover all available pages before exploring further.

Content API endpoints are currently in an open alpha and are subject to change.

Request

The campaign that owns this email message must be in Draft status.

Path parameters

emailMessageId
string
required
The ID of the email message.

Body

expectedRevisionId
string
The contentRevisionId you last fetched. Used for optimistic concurrency. The request is rejected with 409 Conflict if the server’s revision has advanced.
subject
string
Email subject line.
previewText
string
Email preview text.
fromName
string
Sender display name.
fromEmail
string
The sender username (without @ or domain). The team’s sending domain is appended automatically.
replyToEmail
string
Reply-to email. Must be empty or a valid email address.
lmx
string
The email body serialized as LMX. Styles must be embedded in the LMX <Style /> tag. The LMX payload must not exceed 100KB.

Response

Success

success
boolean
required
emailMessageId
string
required
campaignId
nullable string
required
subject
string
required
previewText
string
required
fromName
string
required
fromEmail
string
required
replyToEmail
string
required
lmx
string
required
contentRevisionId
nullable string
required
The current content revision ID. Use this value as expectedRevisionId on your next update request.
updatedAt
string
required
warnings
object[]
Non-fatal issues raised while compiling the submitted LMX. Only present on update responses when warnings were produced.

Error

If the request body is invalid, a 400 Bad Request is returned. A 404 Not Found is returned if the email message does not exist. A 409 Conflict is returned when the campaign is not in draft status, when contentRevisionId is stale, when content cannot be parsed, or when the email message uses MJML format. A 413 Payload Too Large is returned when the LMX payload exceeds the 100KB limit. A 422 Unprocessable Entity is returned when LMX compilation fails. If the API key is invalid (or content API is not enabled for your team), a 401 Unauthorized is returned.
success
boolean
required
message
string
required
{
  "success": true,
  "emailMessageId": "em_01hxyz",
  "campaignId": "cmp_01hxyz",
  "subject": "Big spring updates",
  "previewText": "A quick look at what's new",
  "fromName": "Loops",
  "fromEmail": "hello@news.example.com",
  "replyToEmail": "support@example.com",
  "lmx": "<Email><Text>Hello world</Text></Email>",
  "contentRevisionId": "rev_01hyza",
  "updatedAt": "2026-03-28T15:30:00.000Z"
}
Last modified on May 20, 2026