SMS Alert

HTTP Status Codes

SMSAlert uses standard HTTP status codes to communicate errors:

Status Code

Value

200

OK – Everything went as planned.

202

Accepted – Request accepted.

400

Bad Request – Something in your header or request body was malformed.

401

Unauthorised – Necessary credentials were either missing or invalid.

402

Payment Required – The action is not available on your plan, or you have exceeded usage limits for your current plan.

403

Your credentials are valid, but you don’t have access to the requested resource.

404

Not Found – The object you’re requesting doesn’t exist.

409

Conflict – You might be trying to update the same resource concurrently.

429

Too Many Requests – You are calling our APIs more frequently than we allow.

5xx

Server Errors – Something went wrong on our end. Please try again.

Account

POST Login / Profile

https://www.smsalert.co.in/api/user.json?apikey=5e0741771f08e

params


apikey

5e0741771f08e

API Key generated from your SMS account

Example Request


Example Response

200 – OK

Example Response

401 – Unauthorized

Account

POST Register

https://www.smsalert.co.in/users/add.json?rtype=self

Headers


Content-Type

application/x-www-form-urlencoded

params


rtype

self

Mandatory field for creating the account via api

Body urlencoded


data[User][username]

Ram2254mm

User Name

data[User][mobilenumber]

8010551055

Mobile Number

data[User][emailid]

ram@cozycision.com

Email Id

data[User][firstname]

Ram

First Name

data[User][lastname]

Kumar

Last Name

Example Request


Example Response

200 – OK

Account

POST Forgot Password

https://www.smsalert.co.in/users/forgotpassword.json

Headers


Content-Type

application/x-www-form-urlencoded

Body urlencoded


data[User][username_email]

shanky@cozyvision.com

Registered Mail Id

Example Request


Example Response

200 – OK

Example Response

200 – OK

Account

POST Change Password

https://www.smsalert.co.in/api/changepwd.json

Headers


Content-Type

application/x-www-form-urlencoded

Body urlencoded


apikey

5dd7cd37e7239

API Key generated from your SMS account

pwd

Sh@12345678

Old Password

newpwd

Sh@61257061

New Password

cnfpwd

Sh@61257061

Confirm Password

Example Request


Example Response

200 – OK

Account

POST Update Profile

https://www.smsalert.co.in/api/updateprofile.json?apikey=5e0741771f08e&firstname=Cozy&lastname=Vision&mobilenumber=8010551055&emailid=support@cozyvision.com&fcm_id=6464646

params


apikey

5e0741771f08e

API Key generated from your SMS account

firstname

Cozy

First Name

lastname

Vision

Lastname

mobilenumber

8010551055

Mobile Number

emailid

support@cozyvision.com

Email Id

fcm_id

6464646

Example Request


Example Response

200 – OK

Example Response

401 – Unauthorized

Example Response

200 – OK

Account

GET Balance Check API

https://www.smsalert.co.in/api/creditstatus.json?apikey=5dd7cd37e7239

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

Example Request


Example Response

200 – OK

Example Response

401 – Unauthorized

Account

GET Get Available Sender Id List

http://www.smsalert.co.in/api/senderlist.json?apikey=5dd7cd37e7239

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

Example Request


Example Response

200 – OK

Example Response

200 – OK

Group

GET Get Group List

http://smsalert.co.in/api/grouplist.json?apikey=5e0741771f08e&limit=10&page=1&q=&order=desc

params


apikey

5e0741771f08e

API Key generated from your SMS account

limit

10

To get the list of records available per page. Default value for page is 10.

page

1

To get the list of records from the respective pages. Default value for page is 1.

q

order

desc

Example Request


Example Response

200 – OK

Example Response

200 – OK

Group

POST Create Group

http://www.smsalert.co.in/api/creategroup.json?apikey=5dd7cd37e7239&name=CozyTest

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

name

Cozy Test

Group Name, that you wish to create

Example Request


Example Response

200 – OK

Example Response

200 – OK

Example Response

200 – OK

Group

POST Delete Group

https://www.smsalert.co.in/api/deletegroup.json?apikey=5dd7cd37e7239&id=2227

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

id

2227

Group Id

Example Request


Example Response

200 – OK

Group

POST Edit Group

https://www.smsalert.co.in/api/updategroup.json?apikey=5dd7cd37e7239&id=2227&name=Hello

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

id

2227

Group Id

name

Hello

The Group Name that you want to modified

Example Request


Example Response

200 – OK

Group

POST Send to Group

http://www.smsalert.co.in/api/grouppush.json?apikey=5e0741771f08e&id=2230,2225&sender=TESTIN&text=HelloCozyVision&route=transactional&schedule=2020-05-2219:02

params


apikey

5e0741771f08e

API Key generated from your SMS account

id

2230,2225

Group Id

sender

TESTIN

Sender ID assigned to your account

text

Hello Cozy Vision

Message to be sent

route

transactional

schedule

2020-05-22 19:02

Example Request


Example Response

200 – OK

Contact

GET Contact List

https://www.smsalert.co.in/api/contactlist.json?apikey=5e0741771f08e&group_id=2225&limit=10&page=1&order=desc

params


apikey

5e0741771f08e

API Key generated from your SMS account

group_id

2225

Group Id

limit

10

To get the list of records available per page. Default value for page is 10.

page

1

To get the list of records from the respective pages. Default value for page is 1.

order

desc

Example Request


Example Response

200 – OK

Example Response

200 – OK

Contact

POST Create Contact

http://www.smsalert.co.in/api/createcontact.json?apikey=5dd7cd37e7239&grpname=Test&name=CozyVision&number=8010551055

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

grpname

Test

Group Name in which you want to create contact

name

Cozy Vision

Contact Name of the Contact

number

8010551055

Contact Number of the Contact

Example Request


Example Response

200 – OK

Example Response

401 – Unauthorized

Contact

POST Import Contact

https://www.smsalert.co.in/api/createcontactxml.json

Headers


Content-Type

application/x-www-form-urlencoded

Body urlencoded


data

Xml formatted data

Example Request


Example Response

200 – OK

Example Response

200 – OK

Contact

POST Edit Contact

https://www.smsalert.co.in/api/updatecontact.json?apikey=5dd7cd37e7239&id=3079347&name=CozyVision&number=918010551055

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

id

3079347

Contact Number Id

name

Cozy Vision

Contact Name of the Contact

number

918010551055

Contact Number of the Contact

Example Request


Example Response

200 – OK

Contact

POST Delete Contact

https://www.smsalert.co.in/api/deletecontact.json?apikey=5dd7cd37e7239&id=3079347

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

id

3079347

Contact Number Id

Example Request


Example Response

200 – OK

Template

GET Get Templates List

http://www.smsalert.co.in/api/templatelist.json?apikey=5dd7cd37e7239&order=desc&page=1&limit=10

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

order

desc

page

1

To get the list of records from the respective pages. Default value for page is 1.

limit

10

To get the list of records available per page. Default value for page is 10.

Example Request


Example Response

200 – OK

Example Response

200 – OK

Template

POST Create Template

https://www.smsalert.co.in/api/createtemplate.json?name=Test5&text=test+smsp&apikey=5dd7cd37e7239

params


name

Test5

Template Name

text

test+smsp

SMS Content

apikey

5dd7cd37e7239

API Key generated from your SMS account

Example Request


Example Response

200 – OK

Template

POST Edit Template

https://www.smsalert.co.in/api/updatetemplate.json?apikey=5dd7cd37e7239&name=test&text=test+sms&id=17099

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

name

test

Template Name

text

test+sms

SMS Content

id

17099

Template Id

Example Request


Example Response

200 – OK

Example Response

200 – OK

Template

POST Delete Template

https://www.smsalert.co.in/api/deletetemplate.json?apikey=5dd7cd37e7239&id=17086

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

id

17086

Template Id

Example Request


Example Response

200 – OK

Send SMS

POST Send a SMS

https://www.smsalert.co.in/api/push.json?apikey=5dd7cd37e7239&sender=VIEWIT&mobileno=8010551055&text=Hello%20Cozy

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

sender

VIEWIT

Sender ID assigned to your account

mobileno

8010551055

Mobile number to which the SMS is to be sent.The destination mobile number can be with or without country code. Also provide multiple numbers in comma separated format.

text

Hello%20Cozy

Message to be sent in url-encoded format

Example Request


Example Response

200 – OK

Send SMS

POST XML Push API Format

http://www.smsalert.co.in/api/xmlpush.json?data=<?xmlversion=’1.0’encoding=’UTF-8′?><message><userapikey=’5e0741771f08e’route=’Transactional’/><smstext=’testsmsfromxmlapi’><addressfrom=’TESTIN’to=’8010551055’/><addressfrom=’TESTIN’to=’8010551055’/></sms><smstext=’secondtestsmsfromxmlapi’><addressfrom=’TESTIN’to=’8010551055’/></sms></message>

params


data

<?xml version=’1.0′ encoding=’UTF-8′?> <message> <user apikey=’5e0741771f08e’ route=’Transactional’ /> <sms text=’test sms from xml api’> <address from=’TESTIN’ to=’8010551055′ /> <address from=’TESTIN’ to=’8010551055′ /> </sms> <sms text=’second test sms from xml api’> <address from=’TESTIN’ to=’8010551055′ /> </sms> </message>

Xml formatted data

Example Request


Example Response

200 – OK

Schedule SMS

POST Schedule a SMS

https://www.smsalert.co.in/api/push.json?apikey=5dd7cd37e7239&sender=VIEWIT&mobileno=8010551055&text=Hello%20Cozy&schedule=2019-11-225:49

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

sender

VIEWIT

Sender ID assigned to your account

mobileno

8010551055

Mobile number to which the SMS is to be sent.The destination mobile number can be with or without country code. Also provide multiple numbers in comma separated format.

text

Hello%20Cozy

Message to be sent in url-encoded format

schedule

2019-11-22 5:49

Date and time for updated schedule (Format: YYYY-MM-DD HH:MM:SS)

Example Request


Example Response

400 – Bad Request

Example Response

401 – Unauthorized

Example Response

401 – Unauthorized

Schedule SMS

POST Edit Schedule

http://www.smsalert.co.in/api/modifyschedule.json?apikey=5dd7cd37e7239&batchid=32721115&schedule=2019-11-2510:46:42

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

batchid

32721115

Batch Id of the scheduled sms, received while sending the sms through API

schedule

2019-11-25 10:46:42

Date and time for updated schedule (Format: YYYY-MM-DD HH:MM:SS)

Example Request


Example Response

200 – OK

Schedule SMS

POST Cancel Schedule

http://www.smsalert.co.in/api/cancelschedule.json?apikey=5dd7cd37e7239&batchid=32669767

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

batchid

32669767

Batch Id of the scheduled sms, received while sending the sms through API

Example Request


Example Response

200 – OK

Reports

POST Sent SMS Report

https://www.smsalert.co.in/api/smscampaignlog.json?apikey=5dd7cd37e7239&limit=10&page=1&q=&schedule=1

Headers


Content-Type

application/x-www-form-urlencoded

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

limit

10

To get the list of records available per page. Default value for page is 10.

page

1

To get the list of records from the respective pages. Default value for page is 1.

q

schedule

1

Example Request


Example Response

200 – OK
{
    "status": "success",
    "description": [
        {
            "Smscampaignlog": {
                "id": "19598010",
                "userid": "43",
                "senderid": "FAILSM",
                "text": "Dear test test, OTP generated for your mobile phone verification is 906232 for Request # aBS4hv843vFnxSkpKHWQ.",
                "campaignname": "",
                "source": "Http",
                "ipaddress": "182.74.48.102",
                "route": "3",
                "smscount": "1",
                "creditsrefunded": "1",
                "creditscharged": "1",
                "schedule": false,
                "scheduletime": "2019-01-02 15:57:33",
                "datetime": "2019-01-02 15:57:33"
            }
        },
        {
            "Smscampaignlog": {
                "id": "19612828",
                "userid": "43",
                "senderid": "FAILSM",
                "text": "hello this a test",
                "campaignname": "",
                "source": "Http",
                "ipaddress": "204.141.42.194",
                "route": "3",
                "smscount": "1",
                "creditsrefunded": "1",
                "creditscharged": "1",
                "schedule": false,
                "scheduletime": "2019-01-03 06:06:07",
                "datetime": "2019-01-03 06:06:07"
            }
        },
        {
            "Smscampaignlog": {
                "id": "19631440",
                "userid": "43",
                "senderid": "FAILSM",
                "text": "test",
                "campaignname": "",
                "source": "Http",
                "ipaddress": "182.74.48.102",
                "route": "3",
                "smscount": "1",
                "creditsrefunded": "1",
                "creditscharged": "1",
                "schedule": false,
                "scheduletime": "2019-01-03 17:18:36",
                "datetime": "2019-01-03 17:18:36"
            }
        },
        {
            "Smscampaignlog": {
                "id": "19654329",
                "userid": "43",
                "senderid": "FAILSM",
                "text": "test",
                "campaignname": "",
                "source": "Http",
                "ipaddress": "182.74.48.102",
                "route": "3",
                "smscount": "1",
                "creditsrefunded": "1",
                "creditscharged": "1",
                "schedule": false,
                "scheduletime": "2019-01-04 13:04:06",
                "datetime": "2019-01-04 13:04:06"
            }
        },
        {
            "Smscampaignlog": {
                "id": "19661683",
                "userid": "43",
                "senderid": "FAILSM",
                "text": "Your verification code is 4729",
                "campaignname": "",
                "source": "Http",
                "ipaddress": "127.0.0.1",
                "route": "3",
                "smscount": "1",
                "creditsrefunded": "1",
                "creditscharged": "1",
                "schedule": false,
                "scheduletime": "2019-01-04 16:25:44",
                "datetime": "2019-01-04 16:25:44"
            }
        },
        {
            "Smscampaignlog": {
                "id": "19661715",
                "userid": "43",
                "senderid": "FAILSM",
                "text": "Hello rakesh, thank you for placing your order #491 with MCVTECH.",
                "campaignname": "",
                "source": "Http",
                "ipaddress": "182.74.48.102",
                "route": "3",
                "smscount": "1",
                "creditsrefunded": "1",
                "creditscharged": "1",
                "schedule": false,
                "scheduletime": "2019-01-04 16:26:26",
                "datetime": "2019-01-04 16:26:26"
            }
        },
        {
            "Smscampaignlog": {
                "id": "19661741",
                "userid": "43",
                "senderid": "FAILSM",
                "text": "Hello rakesh, your order #491 with MCVTECH has been dispatched and shall deliver to you shortly.",
                "campaignname": "",
                "source": "Http",
                "ipaddress": "182.74.48.102",
                "route": "3",
                "smscount": "1",
                "creditsrefunded": "1",
                "creditscharged": "1",
                "schedule": false,
                "scheduletime": "2019-01-04 16:27:24",
                "datetime": "2019-01-04 16:27:24"
            }
        },
        {
            "Smscampaignlog": {
                "id": "19661780",
                "userid": "43",
                "senderid": "FAILSM",
                "text": "Hello rakesh, your order #491 with MCVTECH has been put on hold, our team will contact you shortly with more details.",
                "campaignname": "",
                "source": "Http",
                "ipaddress": "182.74.48.102",
                "route": "3",
                "smscount": "1",
                "creditsrefunded": "1",
                "creditscharged": "1",
                "schedule": false,
                "scheduletime": "2019-01-04 16:29:05",
                "datetime": "2019-01-04 16:29:05"
            }
        },
        {
            "Smscampaignlog": {
                "id": "19661781",
                "userid": "43",
                "senderid": "FAILSM",
                "text": "MCVTECH: Your order #491 Rs. 4200.00. is On Hold Now.",
                "campaignname": "",
                "source": "Http",
                "ipaddress": "182.74.48.102",
                "route": "3",
                "smscount": "1",
                "creditsrefunded": "1",
                "creditscharged": "1",
                "schedule": false,
                "scheduletime": "2019-01-04 16:29:05",
                "datetime": "2019-01-04 16:29:05"
            }
        },
        {
            "Smscampaignlog": {
                "id": "19663205",
                "userid": "43",
                "senderid": "FAILSM",
                "text": "Your verification code is 3600",
                "campaignname": "",
                "source": "Http",
                "ipaddress": "127.0.0.1",
                "route": "3",
                "smscount": "1",
                "creditsrefunded": "1",
                "creditscharged": "1",
                "schedule": false,
                "scheduletime": "2019-01-04 16:40:26",
                "datetime": "2019-01-04 16:40:26"
            }
        }
    ]
}

Reports

POST Obtaining Message Delivery Report (Push)

http://www.smsalert.co.in/api/push.json?apikey=5dd7cd37e7239&sender=VIEWIT&mobileno=8010551055&text=Hellotestis&reference=123456&dlrurl=http%3A%2F%2test.com%2Fb418f7cb-1587-4ce0-a81d-cada4e2279c9

params


apikey

5dd7cd37e7239

API Key generated from your SMS account

sender

VIEWIT

Sender ID assigned to your account

mobileno

8010551055

Mobile number to which the SMS is to be sent.The destination mobile number can be with or without 91. Also provide multiple numbers in comma separated format.

text

Hello test is

Message to be sent

reference

123456

e.g. LTXXXXX. Also support comma separated value if multiple mobile number specified

dlrurl

http%3A%2F%2test.com%2Fb418f7cb-1587-4ce0-a81d-cada4e2279c9

Call back delivery report url(url encoded format) e.g. http://www.test.com/dlr.php

Example Request