API Documentation

Get started

API Endpoint 
https://client.msgtiger.com/api/send/sms

Start texting in minutes with our sample codes and comprehensive documentation

To use this API, you need an API key. Please contact us at sales@msgtiger.com to get your own API key.

get characters

              
                # Here is a curl example
curl --location --request POST 'http://127.0.0.1:8000/api/send/sms' \
--header 'client-id: TCtiNkM5WXJlNS9NUjZrdHRsYXovdz09' \
--header 'Accept: application/json' \
--data-urlencode 'sender_id=MsgTig' \
--data-urlencode 'template_id=510163' \
--data-urlencode 'type=text' \
--data-urlencode 'sendTo=mobile' \
--data-urlencode 'group_id=' \
--data-urlencode 'message=Thank you for registering with us. We will contact you shortly - MsgTiger' \
--data-urlencode 'option=N' \
--data-urlencode 'date=' \
--data-urlencode 'time=' \
--data-urlencode 'mobile_no=8981693541,7003152084'
              
            

To get characters you need to make a POST call to the following url :
https://client.msgtiger.com/api/send/sms


              
Result example :

{
    "code": 200,
    "data": {
        "transaction_id": 36,
        "balance": 693
    },
    "status": "success"
}
              
            

Authorization API Key

Key type Description
x-api-key String Your API key.

Request Headers

Key type Description
client-id String Your CLIENT ID key.
Accept String application/json

QUERY PARAMETERS

Field Type Required Description
sender_id String Yes Your Sender Id
template_id String Yes Your Template Id
type String Yes Type must be text/unicode
sendTo String Yes its value must be mobile/group
group_id String No Required if your sendTo Value is group
message String Yes Your Approved template message(respect to your given template id)
option String Yes IF Schedule Sms Then option set as 'S' ELSE 'N'
date Date No Required if your option Value is 'S'. Format (Y-m-d)
time Time No Required if your option Value is 'S', . Format (H:m:s)
mobile_no string Yes EX: 8981XXXXXX,7003XXXXXX

Webhook

API Endpoint 
https://client.msgtiger.com/api/send/sms
              
                # Here is a curl example
curl --location --request POST 'http://127.0.0.1:8000/api/send/query' \
--header 'client_id: TCtiNkM5WXJlNS9NUjZrdHRsYXovdz09' \
--header 'Accept: application/json' \
--data-urlencode 'transaction_id=32'
              
            

To get characters you need to make a POST call to the following url :
https://client.msgtiger.com/api/send/query


              
Result example :

{
    "code": 200,
    "data": [
        {
            "id": 32,
            "number": "89XXXXXXX",
            "message": "Thank you for registering with us. We will contact you shortly - MsgTiger",
            "description": "Message delivered successfully",
            "status": "DELIVERY_SUCCESS"
        },
        {
            "id": 33,
            "number": "70XXXXXXXX",
            "message": "Thank you for registering with us. We will contact you shortly - MsgTiger",
            "description": "Message delivered successfully",
            "status": "DELIVERY_SUCCESS"
        }
    ],
    "msg": "Response Success",
    "errors": [],
    "status": "success"
}
              
            

Authorization API Key

Key type Description
x-api-key String Your API key.

Request Headers

Key type Description
client-id String Your CLIENT ID key.
Accept String application/json

QUERY PARAMETERS

Field Type Required Description
transaction_id Biginteger Yes Transation Id

Check Balance

API Endpoint 
https://client.msgtiger.com/api/check/balance
              
                # Here is a curl example
curl --location --request POST 'http://127.0.0.1:8000/api/check/balance' \
--header 'client_id: TCtiNkM5WXJlNS9NUjZrdHRsYXovdz09' \
--header 'Accept: application/json'
              
            

To get characters you need to make a POST call to the following url :
https://client.msgtiger.com/api/check/balance


              
Result example :

{
    "code": 200,
    "data": {
        "Promo Balance": 691,
        "Trans Balance": 717,
        "OTP Balance": 0
    },
    "status": "success"
}
              
            

Authorization API Key

Key type Description
x-api-key String Your API key.

Request Headers

Key type Description
client-id String Your CLIENT ID key.
Accept String application/json

Errors

The Westeros API uses the following error codes:

              
Error Formats :

Required validation
{
    "code": 413,
    "msg": "Some Fields Missing",
    "errors": {
        "mobile_no": [
            "The mobile no field is required when send to is mobile."
        ]
    },
    "status": "error"
}
Apikey Missing
{
    "code": 403,
    "msg": "API Key Missing",
    "errors": [],
    "status": "error"
}
Client Id Missing
{
    "code": 402,
    "msg": "Client Id Missing",
    "errors": [],
    "status": "error"
}
Webhook Transaction Id Missing
{
    "code": 404,
    "msg": "Invalid Transaction Id",
    "errors": [],
    "status": "error"
}
Insufficient Balance
{
    "code": 404,
    "msg": "Insufficient Balance",
    "errors": [],
    "status": "error"
}
              
            
Error Code Meaning
M401 Invalid Credentials.client_id & x-api-key. This error appears if you use an unknow client_id & x-api-key or if they expired.
M402 Client Id Field Is Missing.ClientId. This error appears if you didnt send client_id
M403 Client Id Field Is Missing.x-api-key. This error appears if you didnt send x-api-key
M413 Some Fields Missing Required Fields. This error appears if you didnt use required fields.
M404 Any Type Of Error