Page tree
Skip to end of metadata
Go to start of metadata

Description

Returns a prepared message identified by the messageId, personalized for contactId

Available from

v14

Request path

GET [REST URL]/preparedmessage/get

Query Parameters

Parameter

Type

Description

messageId

Long

The prepared message ID

contactId

Long

The contact ID to personalize message for. It has to be the member of the prepared message's group

emptyLeave contact empty to get not personalized (raw) message

Example response

{
   "contactId": 45802709,
   "messageId": 7579,
   "name": "JohnPreparedWithCustom20220215",
   "groupId": 3302,
   "groupName": "John20220208",
   "selectionId": null,
   "selectionName": null,
   "channelId": 327699,
   "channelName": "DMC Email",
   "externalId": null,
   "messageCategoryId": null,
   "messageCategoryName": null,
   "message":    {
      "subject": "JohnPreparedWithCustom20220215",
      "emailBodyText": null,
      "emailBodyHtml": "<html><body>JohnPreparedWithCustom20220215\r\nEmail(standard) tt7177798@gmail.comtt7178198@gmail.com\r\nEmail(Custom) OBFUSCATEDtt71778198@gmail.com<\/body><\/html>",
      "smsText": null,
      "faxText": null,
      "emailHeaders": [],
      "attachments": [],
      "attachmentReferences": null,
      "encoding": "ISO-8859-1",
      "encodingSMS": "ISO-8859-1",
      "imageHandlingMode": "none"
   }
}

Error response

{ ... "message": "Please enter a valid prepared message ID" ... }

Error response

{ ... "message": "Please enter a valid test contact ID to get the personalized HTML. Leave it blank to get the raw HTML" ... }

Error response

{ ... "message": "No membership for user '25493969' in group '2186' found.", ...}





  • No labels