HTTP API

This is a brief explanation of how to send SMS using our HTTP API. The endpoint is https://api.demakatso.com:8080/send and the messages are submitted via HTTP POST.

HTTP curl Example

Curl Request:

curl -XPOST –insecure -d ‘{“username”:”SampleUser”,”password”:”SamplePassword”,”to”:”27791234567″,”content”:”Hello from api”, “Refno”: “7777”, “callback”:”http://sms-proxy.demakatso.com/callback.php“}’ -H”Content-Type:application/json” https://api.demakatso.com:8080/send

Successful Response:

{“Code”: 0,”Description”: “Success 874b64f8-f2ec-47f2-8da1-6f53cdfb13a6”}

HTTP API Request Header

Make sure you send a Content-Type header with the value application/json.

HTTP API Input Parameters

NameDescription
usernameYour username supplied by Demakatso
passwordYour password supplied by Demakatso
toThis is the MSISDN including country code. In the case of South Africa it is
11 digits starting with 27 e.g. 27791234567. Contact DeMaKatso support
if you need to send to other countries other than South Africa.
contentUTF-8 text message. One message consists of 160 characters but you will
be able to submit messages longer than this. You will just be billed 1 credit
per 160 characters of each message sent.
RefnoThis reference number is sent back to you via HTTP POST
callbackThis is the URL where we POST the status updates relating to the message
Input Parameters

HTTP API Response Parameter

NameDescription
CodeResponse code which is 0 on success
DescriptionShort description of result. A successful response has the word Success and
a UUID as reference for the transaction.
Response Parameters

HTTP API Status Callback

As the networks send us updates about the messages you sent. We post updates via callbacks to your callback URL. The call back is in JSON format and is sent as a raw POST.

Example POST body looks like the below:

{“RespondID”:”8054fc54-b6c2-4d55-9d93-eb068ef83e27″,”DoneDate”:”2108201310″,”Connector”:”711521205″,”Status”:”DELIVRD”,”Text”:””}

NameDescription
RespondIDThis is the UUID that matches the one you would have received when you
submitted an SMS to the API
DoneDateWhen the network notification was received in the format
YYMMDDHHMM. So the DoneDate within the example before
which was 2108201310 is 20 August 2021 at 1:10pm
ConnectorNot important 🙂
StatusThe state of the message. DELIVRD meaning the message
was delivered to the handset.
TextUsually blank if no problem occurred but sometimes will
contain further information if a problem occurred
Callback JSON field

HTTP API