Messaging Channels/Routes
| Channel | Description |
|---|---|
| generic | This channel is used to send promotional messages and messages to phone number not on dnd |
| dnd | On this channel all your messages deliver whether there is dnd restriction or not on the phone number |
| dnd restriction | This channel sends messages via WhatsApp |
Send message
Endpoint:https://BASE_URL/api/sms/send
Request Type: POST
Body params:
| Options | Required | Description |
|---|---|---|
| api*key | yes | _string* Your API key (It can be found on your Termii dashboard). |
| to | yes | string Represents the destination phone number. Phone number must be in the international format (Example: 23490126727). You can also send to multiple numbers. To do so put numbers in an array (Example: ["23490555546", "23423490126999"]) Please note: the array takes only 100 phone numbers at a time |
| from | yes | string Represents a sender ID for sms which can be Alphanumeric or Device name for Whatsapp. Alphanumeric sender ID length should be between 3 and 11 characters (Example:CompanyName) |
| sms | yes | string Text of a message that would be sent to the destination phone number |
| type | yes | string The kind of message that is sent, which is a plain message. |
| channel | yes | string This is the route through which the message is sent. It is either dnd, whatsapp, or generic |
| media | no | object This is a media object, it is only available for the High Volume WhatsApp. When using the media parameter, ensure you are not using the sms parameter |
| media url | no | string The url to the file resource |
| media caption | no | string The caption that should be added to the image |
| File | Supported Format |
|---|---|
| Image | JPG, JPEG, PNG |
| Audio | MP3, OGG, AMR |
| Documents | |
| Video | MP4 (Note: WhatsApp currently does not support MP4 files without an audio) |
Send Bulk message
Endpoint:https://BASE_URL/api/sms/send/bulk
Request Type: POST
Body params
| Options | Required | Description |
|---|---|---|
| api_key | yes | string Your API key (It can be found on your Termii dashboard). |
| to | yes | string Represents the array of phone numbers you are sending to (Example: [ "23490555546", "23423490126999","23490555546"]). Phone numbers must be in international format (Example: 23490126727). Please note: the array can take up to 10,000 phone numbers |
| from | yes | string Represents a sender ID for sms which can be Alphanumeric or Device name for Whatsapp. Alphanumeric sender ID length should be between 3 and 11 characters (Example: CompanyName) |
| sms | yes | string Text of a message that would be sent to the destination phone number |
| type | yes | string The type of message that is sent, which is a plain message. |
| channel | yes | string This is the channel through which the message is sent. It is either dnd, whatsapp, or generic |