Create a prepared email from a CMS message

Prev Next
Post
/preparedmessage/createFromCms

Available since API v19. Creates a new prepared email without sending it. No request body is required. An explicit groupId overrides the CM2 message's group. If neither provides a valid group, the request fails. The selected group must belong to the current customer. Uses the customer's first active email channel, as with draft-to-prepared conversion. Returns the persisted, unpersonalized PreparedMessage.

Query parameters
cmsMessageId
integer (int64) Required

The required positive ID of the source CM2 message.

groupId
integer (int64)

Optional positive group ID. Overrides the CM2 group assignment when provided.

Responses
200

The created prepared message.

Expand All
object
contactId
integer (int64)
messageId
integer (int64)
name
string
groupId
integer (int64)
groupName
string
selectionId
integer (int64)
selectionName
string
channelId
integer (int64)
channelName
string
externalId
string
messageCategoryId
integer (int64)
messageCategoryName
string
message
object (MessageBase)
subject
string
emailBodyText
string
emailBodyHtml
string
smsText
string
faxText
string
emailHeaders
Array of object (Attribute)
object
name
string
value
string
attachments
Array of object (Attachment)
object
name
string
contentType
string
content
string
attachmentReferences
Array of object (AttachmentReference)
object
contentId
string
reference
string
encoding
string
encodingSMS
string
imageHandlingMode
string
trackingOverride
integer (int64)
400

Invalid or missing CM2 message, group, content or category; insufficient permissions; or no active email channel.

500

An unexpected composition or persistence error occurred.