Send a batch
POST/sms/batch
Endpoint for sending a batch of messages.
When creating an SMS/MMS batch, it can be convenient to customize part(s) of the message on a per recipient basis. Parameterization allows you to do just that!
When defining the message body, just insert as many parameter keys as is required. A key is defined by entering ${key} in the message body, where "key" is the name of the parameter. For each specified parameter key, a recipient and parameter value must also be provided.
For example, the message body "Your appointment is scheduled for ${time}." contains the parameter key "time". When sending the batch, this key would be replaced with the defined value.
Parameter values are then provided per recipient, or default values are provided. When providing parameter values, there are three component:
definition: Specifies the order in which parameter values will be provided in the default and {recipient} arrays.
default: Specifies the default values. The default value is used if an associated recipient array is not provided. Array size must be the same as definition, where an integer of 0 represents NULL or not provided.
recipient: Specifies the parameter values to use for the specified recipient. Again, array size must be the same as definition, where an integer of 0 represents NULL or not provided.
To send media like pictures, videos, and documents you will need to provide the media
parameter with one or more URL.
Request
Responses
- 200