Trigger Email Message
post
/rest/api/v1.3/campaigns/{campaignName}/email
Request
Path Parameters
-
campaignName: string
Campaign Name
Request Body
Root Schema : Trigger Email Message
Type:
object
Title:
Show Source
Trigger Email Message
-
recipientData:
array recipientData
Array of Recipients with Optional Data
Nested Schema : items
Type:
Show Source
object
-
optionalData:
array optionalData
Array of optional data containing name value pairs.
-
recipient:
object recipient
Information about the Recipient.
Nested Schema : optionalData
Type:
array
Array of optional data containing name value pairs.
Show Source
Nested Schema : recipient
Type:
object
Information about the Recipient.
Show Source
-
customerId:
string
Recipient's Customer ID.
-
emailAddress:
string
Recipient's Email Address.
-
emailFormat:
string
Allowed Values:
[ "HTML_FORMAT", "TEXT_FORMAT" ]
Email Format. -
emailMD5Hash(optional):
string
Recipient's MD5 Email Hash Value.
-
emailSHA256Hash(optional):
string
Recipient's SHA256 Email Hash Value.
-
listName(optional):
object listName
Profile List to which the Recipient belongs.
-
mobileNumber:
string
Recipient's Mobile Number.
-
recipientId:
number
Recipient's RIID.
Nested Schema : listName
Type:
object
Profile List to which the Recipient belongs.
Show Source
-
folderName(optional):
string
Folder Name
-
objectName(optional):
string
Profile List Name.
Response
Supported Media Types
- application/json
Default Response
Root Schema : Trigger Email Response
Type:
array
Title:
Trigger Email Response
Array of Recipient Results.
Show Source
-
Array of:
object items
Response for individual recipient.
Nested Schema : items
Type:
object
Response for individual recipient.
Show Source
-
errorMessage(optional):
string
Error Message, if any, that occurred during the trigger operation.
-
recipientId(optional):
number
The Responsys ID (RIID) of the recipient.
-
success(optional):
boolean
Indicates success or failure.
Examples
The following allows triggering email messages to existing members of a profile list.
Request Notes:
- You can send Responsys Email campaigns that already exist to up to 200 members of a profile list.
- Do not use system column names for the optional data, such as
EMAIL_ADDRESS_
. This may cause incorrect data to be processed, possibly resulting in skipped records and incorrect data being recorded in the Event table. - You can also use the Trigger Email Message interface to trigger a proof launch. If you use Trigger Email Message for proof testing, any recipients you include must belong to the profile list associated with the campaign, even if the campaign has a proof/seed list attached. If you try to invoke Trigger Email Message for a recipient not included in the proof/seed list, the system returns a RECIPIENT NOT FOUND error. Note that when the content is changed for the campaign, then a triggered launch will pick up the updated content within 10 minutes. Alternatively, you can use a scheduled launch to see the changes without the delay, and you can also use a scheduled launch if you want to proof test with your proof/seed list. For more details, see Create an Email or Push campaign schedule.
- To pass extended/accented characters in optionalData payload, they must be escaped as Unicode characters. For example, the euro currency symbol is escaped as \u20AC, the yen currency symbol is escaped as \u00A5, an umlauted u is escaped as \u00FC, an accented e is escaped as \u00E9, and the like. Otherwise, you may receive an INVALID_REQUEST_CONTENT error.
FIELDS | DESCRIPTION |
---|---|
Authorization | <AUTH_TOKEN> |
Content-Type | application/json |
Sample Request Body:
{ "recipientData" : [{ "recipient" : { "customerId" : "1", "emailAddress" : "foo.bar@oracle.com", "listName" : { "folderName" : "WS_REST_SAMPLE", "objectName" : "wsrest" }, "recipientId" : null, "mobileNumber" : null, "emailFormat" : "HTML_FORMAT" }, "optionalData" : [{ "name" : "CUSTOM1", "value" : "c1a_value_new" }, { "name" : "CUSTOM2", "value" : "c2a_value_new" } ] }, { "recipient" : { "customerId" : "2", "emailAddress" : "baz.foo@oracle.com", "listName" : { "folderName" : "WS_REST_SAMPLE", "objectName" : "wsrest" }, "emailMD5Hash":"24bf8afff5b7205117bad27358cff79", "emailSHA256Hash":"56f90d1f6a99f605043fdc5ec1384e1213a718e8259e7676e8e7ffb", "recipientId" : null, "mobileNumber" : null, "emailFormat" : "TEXT_FORMAT" }, "optionalData" : [{ "name" : "CUSTOM1", "value" : "c1b_value_new" }, { "name" : "CUSTOM2", "value" : "c2b_value_new" } ] } ] }
Sample Response
The response returns a status for each record sent in the request. In this example, email was sent successfully to the recipient whose RIID is 72067. For the second record, the trigger email action was not successful, because the recipient's deliverability status was undeliverable.
[{ "errorMessage" : null, "success" : true, "recipientId" : 72067 }, { "errorMessage" :"RECIPIENT_STATUS_UNDELIVERABLE: Recipient deliverability status is undeliverable", "success" : false, "recipientId" : -1 } ]