Trigger Email Message with Attachments

post

/rest/api/v1.3/campaigns/{campaignName}/emailAttachments/actions/trigger

Trigger Email Message with attachment data.

Request

Path Parameters
Body ()
Request Body
Root Schema : Trigger Email Message With Attachments
Type: object
Title: Trigger Email Message With Attachments
Show Source
Nested Schema : recipientData
Type: array
Array of Recipients with Optional Data
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : attachmentData
Type: array
Attachment data containing array of pairs of file name and content value.
Show Source
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
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

Body ()
Root Schema : Trigger Email With Attachments Response
Type: array
Title: Trigger Email With Attachments Response
Array of Recipient Results.
Show Source
Nested Schema : items
Type: object
Response for individual recipient.
Show Source
Back to Top

Examples

The following allows triggering email messages with attachment data to existing members of a profile list.

Request Notes:

  • You can send Responsys Email campaigns that already exist to up to 5 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": {
        "emailAddress": "api.user@oracle.com",
        "recipientId": <recipientId>,
        "mobileNumber": "1608777777",
        "customerId": "<customerId>",
        "emailMD5Hash": "<emailMD5Hash>",
        "emailSHA256Hash": "<emailSHA256Hash>"
      },
      "optionalData": [
        {
          "name": "CUSTOM1",
          "value": "<example_value>"
        },
        {
          "name": "CUSTOM2",
          "value": "<example_value>"
        }
      ],
      "attachmentData": [
        {
          "name": "CSV_Attachment",
          "value": "<csvData>"
        },
        {
          "name": "CSV_Attachment",
          "value": "<csvData>"
        }
      ]
    },
    {
      "recipient": {
        "emailAddress": "",
        "recipientId": "3736015741",
        "mobileNumber": null,
        "customerId": null,
        "emailMD5Hash": null,
        "emailSHA256Hash": null
      },
      "optionalData": [
        {
          "name": "CUSTOM1",
          "value": "<sampleValue>"
        },
        {
          "name": "CUSTOM2",
          "value": "<sampleValue>"
        }
      ],
      "attachmentData": [
        {
          "name": "attachment1.jpeg",
          "value": "abc"
        }
      ]
    }
  ]
}
	

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
	 }
       ]

	
Back to Top