Send Message
Send advanced SMS with all available features and parameters. 99% of all use cases can be achieved by using this API method :)
Everything from sending a simple single message to a single destination, up to batch sending of personalized messages to the thousands of recipients with a single API request. Language, transliteration, scheduling and every advanced feature you can think of is supported.
Sequence Diagram

You can start creating HTTP request as this following:
Name
Description
HTTP Request (URL):
HTTP Headers
Content-Type: application/json
Authorization: (Basic Auth) Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
HTTP Methods
POST
Request body requires Parameters as these following
Parameters
Type
Description
bulkId
(optional)
String (50)
The ID which uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address.
messages
Array (11)
Set of information of sending messages
from
String (11)
Represents a sender ID which can be alphanumeric or numeric (maximum 11 characters, space is not allowed. Example: from = ANTS
destinations
Array (500)
The array of message destination addresses. If you want to send a message to one destination, a single String is supported instead of an Array (recommend up to 500 numbers per 1 bulk request). Destination addresses must be in international format Example: to = 6698336789
to
Strings
The destination mobile number for your message.
It must be international format.
Example: to = 6698336789
messageId
(optional)
String (200)
The ID that uniquely identifies the message sent.
text
String(1600)
Text of the message that will be sent
Example: text = Hello, ANTS world :)
shorturl
(optional)
String(y or n)
Use URL shorten function
Example : shorturl = "y"
notifyUrl
(optional)
String (150)
Defending URL on callback server to get Delivery report according to Send Callback link
Example: notifyUrl=https//www.example.com
notifyContentType
(optional)
String (50)
Preferred Delivery report content type of delivery report to application/json
Example: notifyContentType=application/json
sendAt
(optional)
DateTime
Date and time when the message is to be sent, used for scheduling SMS in the future
Format: 01/01/2020 09:00
callbackData
(optional)
String(1000)
Specifies the value to return. When specified, notifyUrl will also return this callbackData.
The JSON request will look like:
{
"bulkId": "75108ada-ffa3-4577-8ff1-db2a4690ccbd",
"messages": [
{
"from": "ANTS",
"destinations": [
{
"to": "66123456789",
"messageId": "25501288135972440649"
}
],
"text": "สวัสดี Hello ANTS Word",
"shorturl" : "n",
"notifyUrl": "https://www.callback.ants.co.th",
"notifyContentType": "application/json",
"sendAt": "01/01/2020 09:00",
"callbackData": "ANTS Data"
}
]
}
Last updated
Was this helpful?