Shortcodes


Send SMS

To send an sms you need to send a HTTP POST to the endpoints below:


Endpoints

Production: https://sms.suntech-solutions.net/sms/serve

Required headers

Header Name Value
Content-Type:

application/json

Parameters

Name Parameter Type Description Required Default Value
countrycode

String Destination country for the sms recipient. Optional
operation

String The current operation code(case sensitive). Required shortcode
auth

String Suntech authentication. This is generated as per request. You sha256 encrypt the combination of Clientkey which shall be a preshared key issued and the recipient msisdn param below
Auth = sha256(ClientKey + Msisdn)
Required
linkid

String This ID is generated when a user requests for a service in SDP. This parameter is mandatory while delivering content for ondemand services. Required
apikey

String Suntech Api Key on Api Settings. Required
reference

String Unique transaction reference for the transaction, you can use guid. Required
from

String The shortcode to send the sms from, Must be approved and registered on the suntech platform. Required
msisdn

String The recipient of the sms. Required
sms

String The content of the sms to be sent. Required

Sample request

        
            {
                "countrycode": "ke",
                "apikey": "1232",
                "auth": "ltn3g2q6f37yhlglfhmn",
                "linkid": "ltn3g2q6f37yhlglfhmn",
                "operation": "shortcode",
                "operator": "telkom",
                "from": "22000",
                "msisdn": "254710000000",
                "sms": "Test sms to the mobile",
                "reference": "SBQAVTBJK"
            }
        
	    

Response

Response comes as a JSON string with the following fields:

Parameter Parameter Type Description Values
status
string
The status code of the transaction 200
message
string
The description of the status code of the transaction Successful

Sample Reponse

Below is a sample send sms response for a successful request:

         	
	     {
            "status":"200",
            "message":"Successful" 
         }
		
	    

Callback

You will need to provide a webhook for the notification to be mapped to your shortcode

Callback notification is made to your webhook once a subscriber sends a message to the shortcode. The callback comes as a JSON string with the following fields:

Parameter Parameter Type Description Example Value
reference
string
The is unique reference for every request 10188812330590220973
timestamp
string
The timestamp of the transaction 20201113175601
linkid
string
This ID is generated when a user requests for a service in SDP. It is not mandatory for subscription mode 00223110188812330591606659
language
integer
The description of the status code of the transaction 1
type
string
The type of notificaton NOTIFY_LINKID
content
string
This is the content the user send to the shortcode OK
msisdn
string
The mobile number of the sender 254700111222

Sample Notification

Below is a sample notification callback:

        
                {
                    "reference":"10188812330590220973",
                    "timestamp":"20201113175601",
                    "linkid":"00223110188812330591606659",
                    "shortcode":"22000",
                    "language":"1",
                    "type":"NOTIFY_LINKID",,
                    "msisdn":"254700111222"
                    "content":"JOIN"
                }
            
	    

Sample Notification Reponse

Below is a sample response you should respond with for the callback request

         	
	     {
            "status":"200",
            "message":"Successful" 
         }