Sending messages

In order to send a message, you must have an active SMS channel and perform a HTTP request to the following endpoint with a valid access key

When sending outbound messages as well as setting the receiver information you must set message body field in all cases except for sending a message template when you must only set the template field

Body

{
 "receiver": {
   "contacts": [
     {
       "identifierValue": "+31612345678"
     }
   ]
 },
 "body": {...}
}

Template

{
 "receiver": {
   "contacts": [
     {
       "identifierValue": "+31612345678"
     }
   ]
 },
 "template": {...}
}

SMS messages

All SMS channels support sending basic text based messages using SMS. The example below must be set in the message body field

{
 "receiver": {
   "contacts": [
     {
       "identifierValue": "+31612345678"
     }
   ]
 },
 "body": {...}
}

Send an SMS message

To send an SMS text message set the message body as follows:

 {
  "type": "text",
  "text": {
    "text": "Single text message"
  }
}

MMS messages

SMS channels that are installed with MMS capable numbers (currently numbers purchased for the United States and Canada) also support media messaging. You can also verify if the channel is MMS capable via the API as described here.

Image

Single image message

Single image message with text

Single image message with text and title

Multiple image message

When sending multiple image messages it is possible to send up to an array of 10 media URLs.

Multiple image message with text

Multiple image message with text and title

File

Single file message

Single file message with text

Single file message with text and title

Multiple file message

Multiple file message with text

Multiple file message with text and title

Template messages

The examples below must be set in the message template field

{
 "receiver": {
   "contacts": [
     {
       "identifierValue": "+31612345678"
     }
   ]
 },
 "template": {...}
}

Text templates

Text templates will be sent as SMS messages and are compatible with all SMS channels

Last updated