v1

latestOpenAPI 3.1.02026-07-2414238909.1 KB

Send Bulk Messages - Campaigns

Routee allows to send messages to multiple recipients/contacts/groups. This is a paid service. For pricing check here

post/sms/campaign

Headers

Content-Typestring required

application/json

Authorizationstring required

Bearer {access_token}

Request body

contactsstring[]

The contact ids that the message will be sent to. Contacts have to be uploaded to the system. One of "groups", "to", "contacts" parameters is required.

groupsstring[]

The groups of contacts in the account selected as recipients. Groups have to be created at the system. One of "groups", "to", "contacts" parameters is required.

tostring[]

The phone numbers (array) the message is about to be sent to. Format with a '+' and country code e.g., +306948530920 (E.164 format). Maximum array of number allowed 30k. One of "groups", "to", "contacts" parameters is required.

fromstring required

The sender of the message. This can be a telephone number (numeric string with maximum length 16 characters) or an alphanumeric string (maximum length 11 characters). When you want to use a number, you have to enter it without the '+' before the country code (eg 447123123456).

bodystring required

The message you want to send. Use "\n" to create a new line in your message. Use [~{labelName}] in order to send personalized messages, by using the labels of your contacts.

scheduledDatestring date

Defines the scheduled date and time in UTC. (eg YYYY-MM-DDThh:mm:ssTZD where TZD is the time zone designator (Z or +hh:mm or -hh:mm))

campaignNamestring

The name of the campaign. If you want to be able to track the whole campaign from Routee web platform use a name. If no name is provided you won’t be able to see the campaign from Routee web platform but you can track all the individual messages. Must be between 2 and 30 characters and contain only latin letters, numbers, spaces and -

flashboolean

Indicates if the SMS is a flash SMS. A flash SMS is a type of SMS that appears directly on the main screen without user interaction and is not automatically stored in the inbox. It can be useful in emergencies, such as a fire alarm or cases of confidentiality, as in delivering one-time passwords. Default value false

respectQuietHoursboolean

Indicates if the SMS should respect the quiet hours. Quiet Hours are set by default to 23.00 - 08.00 and 14.00-17.00 destination local time. Please note that not all countries are supported with this feature due to multiple time zones within the country. Default value false

fallbackValuesstring

Defines the default values when the SMS has labels, in case a contact does not contain any of these labels.

ttlinteger

The duration in minutes the delivery of an SMS will be attempted. Must be between 1-4320. By default Routee will attempt delivery for 72 hours. If the SMS is not delivered within the validity period, then the SMS status will be "Undelivered", with "detailedStatus": "Expired"

allowInvalidboolean

Allow invalid recipients. By setting 'allowInvalid' to true, the API will not return the invalid numbers and will sent the messages to the valid ones only

transcodeboolean

If “transcode” is set to true/false, then the message body will be/not be transcoded. If the “transcode” parameter is not set, then the application level setting will be used. In case the message can be sent as UTF in one part, it will not be transcoded.

Response

200

trackingIdstring
typestring
statestring
createdAtstring
respectQuietHoursboolean
fromstring
tostring[]
bodystring
flashboolean
costinteger
totalMessagesinteger

Example response

{
  "trackingId": "f085b02f-8bca-4e17-8e9a-ed49g02298eb",
  "type": "Sms",
  "state": "Queued",
  "createdAt": "2016-02-13T09:48:02.389Z",
  "from": "mindpuzzle",
  "to": [
    "+30697xxxxxxx"
  ],
  "body": "Hello, a new version of MindPuzzle is available. Check it out",
  "smsAnalysis": {
    "numberOfRecipients": 3,
    "recipientsPerCountry": {
      "GR": 3
    },
    "recipientCountries": {
      "+30697xxxxxxx": "GR",
      "+30693xxxxxxx": "GR",
      "+30694xxxxxxx": "GR"
    },
    "bodyAnalysis": {
      "parts": 1,
      "characters": 61
    }
  },
  "totalMessages": 3
}