POST /messaging/v1/push/messages/
Send a message to multiple recipients using a send definition.
Provide a messageKey in the request. If you don't, a messageKey is automatically generated in the response. The limit is 2000 devices per request. If you send attributes with the recipients, we recommend no more than 500 devices per request (this limit is the same as email).
Name | Type | Description | Notes |
---|---|---|---|
definitionKey | string | Required. The unique identifier of the definition. | |
recipients | object[] | Required. The object that contains parameters and metadata for the recipient, such as send tracking and personalization attributes. Use this parameter to send to one or multiple recipients. | |
recipients.contactKey | string | Required when recipients.to is not provided. The unique identifier for a subscriber in Marketing Cloud. | If sending by only contactKey, sends to all Active devices that belong to that contactKey. |
recipients.to | string[] | Required when recipients.contactKey is not provided. The channel address of the recipient. For push, the address is the recipient's device token. | |
recipients.messageKey | string | The unique identifier used to track message status. The identifier can be automatically created when you create a message or provided as part of the request. The identifier can be up to 100 characters, with no restrictions on characters. Each recipient in a request must have a unique messageKey. In requests containing duplicate values for messageKey , the message is rejected. | This key allows tracking. |
recipients.attributes | object | The information used to personalize the message for the recipient, written as key-value pairs. The attributes match profile attributes, content attributes, or triggered send data extension attributes. | This information allows recipient level personalization. |
attributes | object | The information that personalizes the message for the request, written as key-value pairs. The attributes match profile attributes, content attributes, or triggered send data extension attributes. | These attributes allow batch-level personalization. |
options.sound | string | The sound file that is played when the push message arrives on the mobile device. The value provided here overrides the value on the push message definition. The name must be 100 characters or less. | When provided, this value overrides the corresponding template property. |
options.badge | string | This value available for both iOS and Android. For iOS SDK version 4.9.5 and newer, this value overrides the value on the push message definition The badge count displays this number in a badge on the app and increments this number by one for each new unread message. For older iOS SDK versions, this value overrides the value on the push message definition, but the badge count does not increment. | When provided, this value overrides the corresponding template property. The string value must resolve to an integer. Values such as "1", "+1", "2", and "+2" are acceptable. |
content.title | string | The message title. | When provided, this value overrides the corresponding template property. |
content.subtitle | string | The subtitle for the message. | When provided, this value overrides the corresponding template property. |
content.message | string | The message content that you want sent with each message. Use substitution strings and AMPscript to personalize the message. | When provided, this value overrides the corresponding template property. |
content.url | string | The deep link URL. | When provided, this value overrides the corresponding template property. |
content.alttext | string | The text to display if the message cannot include the specified rich media. | When provided, this value overrides the corresponding template property. |
content.mediaurl | string | The url of the rich media to include in the message. | When provided, this value overrides the corresponding template property. |
content.ios | object | The object that contains overrides for iOS device content object parameters. | When provided, this value overrides the corresponding template property. |
content.android | object | The object that contains overrides for Android device content object parameters. | When provided, this value overrides the corresponding template property. |
Example Response