SMS HTTP API Documentation

1.SMS HTTP API

Send SMS messages via HTTP requests. Below are supported formats.

Request Formats:

GET (HTTP)

http://1.1.1.1:8001/api?username=<username>&password=<password>&ani=<ani>&dnis=<dnis>&message=<message>&command=submit&serviceType=<type>&longMessageMode=<mode>

GET (HTTPS)

https://domainname:8002/api?...same as above...

POST (Credentials in URL)

curl -X POST -H 'Content-Type: application/json' -d '{"ani":"ani","dnis":"dnis","message":"test"}' 'http://1.1.1.1:8001/api?command=submit&username=username&password=password'

POST (Credentials in JSON)

curl -X POST -H 'Content-Type: application/json' -d '{"username":"username","password":"password","command":"submit","ani":"ani","dnis":"dnis","message":"test"}' 'http://1.1.1.1:8001/api'

Parameters

ParameterDescriptionRequired
commandsubmit / query / moYes
dnisDestination (E.164 format)Yes
messageMessage contentYes
usernameAPI usernameYes
passwordAPI passwordYes
serviceTypeService codeNo

Response Example:

{"message_id":"alss-a1b2c3d4-e5f67890"}

2. SMS Status Request API

Use this to check delivery status of previously sent SMS.

GET Request

http://1.1.1.1:8001/api?username=<username>&password=<password>&messageId=<msgId>&command=query

Parameters

ParameterDescriptionRequired
usernameAPI usernameYes
passwordAPI passwordYes
messageIdMessage ID from submissionYes
commandSet to “query”Yes

Response Example:

{"status": "DELIVRD", "delivery_time": "20210922093309", ...}