API

WIth our trusted and RESTFul API, you can integrate our services on third party systems or develop awesome SMS applications too.


Base URL:              http://account.smskit.net/smsAPI

Request Method:        POST or GET


Sending SMS

Sample request

Parameters

  • apikey: Your unique API Key (required)
  • apitoken: Your unique API Token (required)
  • type: Message Type Eg. sms, voice, unicode, flash, mms, whatsapp (default is sms) (required)
  • from: Your Sender ID (required)
  • to: Destination Number (country code) (required)
  • text: Your message text (url encoded) (required)
  • file: Voice file URL (for voice message) or Multimedia file URL (for mms or whatsapp message) (optional)
  • scheduledate: Date and Time to send message (YYYY-MM-DD HH:mm:ss) (optional)
  • duration: Duration of your voice message in seconds (required for voice)

Sample Success Response (JSON)

  •                     {
                            "request": "sendsms",
                            "status": "queued",
                            "group_id": "1234",
                            "date": "2018-04-24 12:25:23"
                        }   
                    

Sample Error Response (JSON)

  •                      {
                            "request": "sendsms",
                            "status": "error",
                            "message": "Sender ID not allowed"
                        }   
                     

Check SMS Status

Sample Request

Parameters

  • apikey: Your unique API Key (required)
  • apitoken: Your unique API Token (required)
  • groupid: The group_id returned by sendsms request (required)

Sample Success Response (JSON)

  •                    {
                            "request": "groupstatus",
                            "status": "success",
                            "group_id": "1234",
                            "group_status": "sent",
                            "recipients": [
                                {
                                    "id": "21",
                                    "to": "231235433",
                                    "status": "failed"
                                },
                                {
                                    "id": "22",
                                    "to": "4471235433",
                                    "status": "sent"
                                },
                                {
                                    "id": "25",
                                    "to": "1871235433",
                                    "status": "queued"
                                }
                            ],
                            "date": "2018-04-24 12:25:23"
                        }   
                   

Sample Error Response (JSON)

  •                     {
                            "request": "groupstatus",
                            "status": "error",
                            "message": "Error message",
                        }   
                     

Read SMS Inbox

Sample Request

Parameters

  • apikey: Your unique API Key (required)
  • apitoken: Your unique API Token (required)
  • list: "all" will return all messages while "unread" will return only unread messages (default is unread) (optional)

Sample Success Response (JSON)

  •                     {
                            "request": "getinbox",
                            "status": "success",
                            "inbox": [
                                {
                                    "id": "12",
                                    "from": "123456789",
                                    "to": "2347015272",
                                    "message": "Hi. This is message 1",
                                    "date": "2018-04-24 12:25:23"
                                },
                                {
                                    "id": "26",
                                    "from": "447882892",
                                    "to": "2347015272",
                                    "message": "Hi again. This is message 2",
                                    "date": "2018-04-24 12:25:23"
                                }
                           ]
                        }   
                     

Sample Error Response (JSON)

  •                     {
                            "request": "getinbox",
                            "status": "error",
                            "message": "Error",
                        }   
                     

Credit Balance

Sample Request

Parameters

  • apikey: Your unique API Key (required)
  • apitoken: Your unique API Token (required)

Sample Success Response (JSON)

  •                     {
                            "balance": "12345"
                        }   
                     

Sample Error Response (JSON)

  •                     {
                            "request": "balance",
                            "status": "error",
                            "message": "Invalid user",
                        }