Welcome to Messalogy Docs
Get familiar with our APIs and technical resources in your favorite languages.
Messalogy's Programmable SMS API enables you to programmatically send SMS messages from your web application. First, you need to create a new message object. Messalogy returns the created message object with each request.
Send your first SMS message with this example request.
Parameters
Parameter
recipient
Required
Type
Yes
String
Description
Number to send message. Use comma (,) to send multiple numbers. Ex. 31612345678,8801721970168
sender_id
Yes
String
The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters.
type
Yes
String
The type of the message. For text message you have to insert
plain as sms type.
message
Yes
String
The body of the SMS message.
schedule_time
No
Datetime
The scheduled date and time of the message in RFC3339
format (Y-m-d H:i)
dlt_template_id
No
String
The ID of your registered DLT (Distributed Ledger Technology) content template.
Example request for Single Number
PHP
curl -X POST https://panel.messalogy.com/api/v3/sms/send \
-H 'Authorization: Bearer Unique***Token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
}'
Example request for Multiple Numbers
PHP
curl -X POST https://panel.messalogy.com/api/v3/sms/send \
-H 'Authorization: Bearer Unique***Token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678,880172145789",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
"schedule_time=2021-12-20 07:00"
}'
Returns
Returns a contact object if the request was successful.
JSON
{
"status": "success",
"data": "sms reports with all details",
}
If the request failed, an error object will be returned.
JSON
{
"status": "error",
"message": "A human-readable description of the error."
}