POST /messaging/v1/sms/messages/

Sends an SMS message to multiple recipients using a send definition.

NameTypeDescription
definitionKeystringRequired. The ID of the send definition.
recipientsarrayRequired. An array of recipient objects that contain parameters and metadata for the recipients, such as tracking and personalization attributes. If this array is present in the request, the recipient object (which is used to send messages to individual recipients) can't be included in the request.
recipients.contactKeystringRequired. A unique identifier for the subscriber. You can create a contact key at send time if the contact isn’t already in Marketing Cloud Engagement.
recipients.tostringRequired. The phone number of the recipient.
recipients.messageKeystringA unique identifier that you can use to track the status of the message. You can provide this key as part of the request. If you don't provide a key, the system generates one for you. The key can contain up to 100 characters. There are no character restrictions. The message key that you provide must be unique among all of the keys that have been used in your business unit over the prior 72 hours. If you use a duplicate messageKey in the same request, the message is rejected
recipients.attributesobjectPersonalization information for the recipient. Written as key-value pairs. The attributes match profile attributes, content attributes, or triggered send data extension attributes.
subscriptions.resubscribebooleanIf true, the mobile number is subscribed to a short code, even if the recipient opted out by replying STOP to a previous message. This option is used to ensure that critical transactional messages are delivered, even if the subscriber previously opted out.
content.messagestringAn override for the message content in the send definition. Use substitution strings to personalize the content.
attributesobjectInformation used to personalize the message for the request. Written as key-value pairs. The attributes match profile attributes, content attributes, or triggered send data extension attributes.

The response includes a request ID for the entire request. The responses array contains a messageKey value for each message that you attempted to send. If a message was sent successfully, the array object doesn’t contain any additional information.

If a message wasn’t sent, the object in the responses array still includes a messageKey, but it also includes the reason that the message failed to send. The response can include a combination of successful and unsuccessful sends. In other words, one unsuccessful send doesn’t cause the entire batch to fail.