SMS API Documentation Mtalkz Updated
SMS API Documentation Mtalkz Updated
SMS API
Documentation
Page 2
1. Sending SMS
Sending An SMS
http://msg.mtalkz.com/V2/http-api.php?
apikey=XXXXXXXXXXXXXXXX&senderid=XXXXXX&number=XXXXXXXXXXX,a
XXXXXXXXXXX,XXXXXXXXXXX&message=hello there&format=json
{
"APIKEY": "XXXXXXXXXXXXXXXX",
"SENDERID": "XXXXXX",
"NUMBER": "99XXXXXXXX,99XXXXXXXX",
"MESSAGE": "MESSAGE TO BE SEND",
"FORMAT": "JSON"
}
Mandatory Parameters
The mandatory parameters in the HTTP API are tabulated below:
Page 3
Mobile number to which the SMS is
to be sent.The destination mobile Mobile number like 91XXXXXXXXX OR
Mobile number number number can be with or without 91. 98908XXXXX OR
Also provide multiple numbers in 91XXXXXXXXX,98908XXXXX
comma separated format.
Optional Parameters
The optional parameters in the HTTP API are tabulated below:
EX Format: YYYY-MM-DD
HH:MM:SS OR YYYY-MM-DD
Schedule time time Date and time for scheduling an SMS
HH:MM AM/PM
Like : 2016-12-06 04:45pm
To specify that which url you want to The url you want to hit
Original URL originalurl
redirect on click. Ex: www.example.com
Page 4
Example Responses
JSON
{
"status": "OK",
"data": [
{
"id": "32-1",
"mobile": "918800852106",
"status": "SUBMITTED"
},
{
"id": "32-2",
"mobile": "919004674356",
"status": "SUBMITTED"
},
{
"id": "32-3",
"mobile": "918471015383",
"status": "SUBMITTED"
}
],
"msgid" => "9813100982"
"message": "message Submitted successfully"
}
PHP
Array
(
[status] => OK
[data] => Array
(
[0] => Array
(
[id] => 34-1
[mobile] => 918800852106
[status] => SUBMITTED
)
Page 5
)
[msgid] => 9813100982
[message] => message Submitted successfully
)
Error Response
{
"status":"AZQ02",
"message":"Invalid Api Key"
}
Response Data
STATUS MESSAGE
Page 6
AZQ07 Schedule Datetime can't less than current time
Page 7
2. XML API
Below is the sample xml data before url encoding. You have to send below
xml in post method.
Parameter Specifications :
Mandatory Parameters :
Page 8
Optional Parameters
The optional parameters in the HTTP Balance API are tabulated below:
Ex:
Specify the template id to
Template Id template_id template_id=290346821103XX
send message
XX
Error Response :
Error Status
Success Status
Page 9
3. Customize SMS
Add nearly any HTML within, even for linked list groups like the one below.
http://msg.mtalkz.com/V2/http-customize-api.php?
apikey=XXXXXXXXXXXXXXXX&senderid=XXXXXX&number=XXXXXXXXXXX,XXXXXX
XXXXX,XXXXXXXXXXX&message=msg1^msg2^msg3&shortlink=1&originalurl=XX
XXXXXX&format=json
http://msg.mtalkz.com/V2/http-customize-api-post.php
{
"apikey": "XXXXXXXXXXXXXXXX",
"senderid": "XXXXXX",
"format": "json",
"data": [
{
"number": "91XXXXXXXXXX",
"message": "This is test SMS1"
},
{
"number": "91XXXXXXXXXX",
"message": "This is test SMS2"
}
]
}
Page 10
Mandatory Parameters
The mandatory parameters in the HTTP Customize API are tabulated below
Optional Parameters
The optional parameters in the HTTP Customize API are tabulated below:
EX Format: YYYY-MM-DD
Date and time for scheduling an HH:MM:SS OR YYYY-MM-DD
Schedule time time
SMS HH:MM AM/PM
Like : 2016-12-06 04:45pm
Page 11
Name Parameter Description Expected Values
To specify that which url you want The url you want to hit
Original URL originalurl
to redirect on click. Ex: www.example.com
Example Responses
JSON
{
"status": "OK",
"data": [
{
"id": "32-1",
"mobile": "918800852106",
"status": "SUBMITTED"
},
{
"id": "32-2",
"mobile": "919004674356",
"status": "SUBMITTED"
},
{
"id": "32-3",
"mobile": "918471015383",
"status": "SUBMITTED"
}
],
"msgid" => "9813100982"
"message": "message Submitted successfully"
}
Page 12
PHP
Array
(
[status] => OK
[data] => Array
(
[0] => Array
(
[id] => 34-1
[mobile] => 918800852106
[status] => SUBMITTED
)
Error Response
{
"status":"AZQ02",
"message":"Invalid Api Key"
}
Page 13
Response Data
STATUS MESSAGE
Page 14
4. Pull DLR Response
Mandatory Parameters
The mandatory parameters in the HTTP API are tabulated below:
Response id{"id":"xxxxxxxx-x"}
id like {"id":"xxxxxxxx-x"} give the status of
Id id to which you want to get
a number like 98908XXXXX
DLR Response.
Optional Parameters
The optional parameters in the HTTP API are tabulated below:
Page 15
Example Responses
JSON
{
"status": "OK",
"data": [
{
"id": "32-1",
"mobile": "8471015383",
"status": "submitted"
"status-desc": "delivered"
},
{
"id": "32-2",
"mobile": "8471015383",
"status": "submitted"
"status-desc": "delivered"
},
{
"id": "32-3",
"mobile": "8471015383",
"status": "submitted"
"status-desc": "delivered"
}
],
"message": "request Submitted successfully"
}
PHP
Array
(
[status] => OK
[data] => Array
(
[0] => Array
(
[id] => 34-1
[mobile] => 918800852106
[status] => submitted
[status-desc] => delivered
)
Page 16
[2] => Array
(
[id] => 34-3
[mobile] => 918471015383
[status] => submitted
[status-desc] => delivered
)
Error Response
{
"status":"AZQ02",
"message":"Invalid Api Key"
}
Response Data
Page 17
API Response Codes
The common error codes received while using the API to send an SMS is in the below format :
STATUS MESSAGE
The common error codes received while using the API to send an SMS is in the below format :
STATUS MESSAGE
Page 18
5. PUSH DLR Response
The DLR Push API sends the DLR to the Client's URL , the method used for pushing delivery
report onto the client's URL
http://msg.mtalkz.com/V2/http-api.php?
apikey=XXXXXXXXXXXXXXXX&senderid=XXXXXX&number=XXXXXXXXXXX,
XXXXXXXXXXX,XXXXXXXXXXX&message=hello there&format=json&dlrurl=your dlr
url&reqmethod=X
Mandatory Parameters
The mandatory parameters in the HTTP API are tabulated below:
Sender ID senderid Sender ID assigned to your account Sender ID 6 Character only allow
Page 19
Delivery Report Push Format using post method :
sender Sender-id.
Page 20
6. Balance API
http://msg.mtalkz.com/V2/http-balance-api.php?
apikey=XXXXXXXXXXXXXXXX&format=json
Mandatory Parameters
The mandatory parameters in the HTTP Balance API are tabulated below:
Optional Parameters
The optional parameters in the HTTP Balance API are tabulated below:
Page 21
JSON
{
"status": "OK",
"data": [
{
"balance": "50000",
"gateway": "Transactional"
},
],
"message": "Request Submitted Successfully"
}
PHP
Array
(
[status] => OK
[data] => Array
(
[balance] => 50000
[status] => Transactional
)
[message] => Request Submitted successfully
)
Error Response
{
"status":"AZQ02",
"message":"Invalid Api Key"
}
Response Data
Page 22
7. Delete Schedule API
Mandatory Parameters
The mandatory parameters in the HTTP Delete Schedule API are tabulated below:
Optional Parameters
The optional parameters in the HTTP Balance API are tabulated below:
Page 23
Example Responses
JSON
{
"status": "OK",
"data": [
{
"id": "100",
"Schedule Date": "2018-08-10 04:45 pm"
},
],
"message": "Schedule message deleted successfully"
}
PHP
Array
(
[status] => OK
[data] => Array
(
[balance] => 100
[status] => 2018-08-10 04:45 pm
)
[message] => Schedule message deleted successfully
)
Error Response
{
"status":"AZQ02",
"message":"Invalid Api Key"
}
Response Data
Page 24
API Error Codes
The common error codes received while using the API to send an SMS is in the below format :
STATUS MESSAGE
Page 25
8. International SMS API
Sending An SMS
http://msg.mtalkz.com/V2/http-api-int.php?
apikey=XXXXXXXXXXXXXXXX&senderid=XXXXXX&number=XXXXXXXXXXX,
XXXXXXXXXXX,XXXXXXXXXXX&message=hello there&format=json
Mandatory Parameters
The mandatory parameters in the HTTP API are tabulated below:
Page 26
Optional Parameters
EX Format: YYYY-MM-DD
Schedule HH:MM:SS OR YYYY-MM-DD
time Date and time for scheduling an SMS
time HH:MM AM/PM
Like : 2016-12-06 04:45pm
To specify that which url you want to The url you want to hit
Original URL originalurl
redirect on click. Ex: www.example.com
Example Responses
JSON
{
"status": "OK",
"data": [
{
"id": "32-1",
"mobile": "918800852106",
"status": "SUBMITTED"
},
{
"id": "32-2",
"mobile": "919004674356",
"status": "SUBMITTED"
},
{
"id": "32-3",
"mobile": "918471015383",
"status": "SUBMITTED"
}
],
"msgid" => "9813100982"
"message": "message Submitted successfully"
}
Page 27
PHP
{
"status": "OK",
"data": [
{
"id": "32-1",
"mobile": "918800852106",
"status": "SUBMITTED"
},
{
"id": "32-2",
"mobile": "919004674356",
"status": "SUBMITTED"
},
{
"id": "32-3",
"mobile": "918471015383",
"status": "SUBMITTED"
}
],
"msgid" => "9813100982"
"message": "message Submitted successfully"
}
Response Data
Page 28
API Error Codes
The common error codes received while using the API to send an SMS is in the below format :
STATUS MESSAGE
Page 29
9. WhatsApp SMS API
Sending An SMS
http://msg.mtalkz.com/V2/http-waapi.php?
apikey=XXXXXXXXXXXXXXXX&source=XXXXXX&number=XXXXXXXXXXX,
XXXXXXXXXXX,XXXXXXXXXXX&message=hello there&format=json
Mandatory Parameters
Page 30
Optional Parameters
The optional parameters in the HTTP API are tabulated below:
EX Format: YYYY-MM-DD
Date and time for scheduling an HH:MM:SS OR YYYY-MM-DD
Schedule time time
SMS HH:MM AM/PM
Like : 2020-12-06 04:45pm
Example Responses
JSON
{
"status": "OK",
"data": [
{
"id": "32-1",
"mobile": "880XXXXXXX",
"status": "SUBMITTED"
},
{
"id": "32-2",
"mobile": "900XXXXXXX",
"status": "SUBMITTED"
},
{
"id": "32-3",
"mobile": "847XXXXXXX",
"status": "SUBMITTED"
}
],
"msgid" => "9813100982"
"message": "message Submitted successfully"
}
Page 31
PHP
Array
(
[status] => OK
[data] => Array
(
[0] => Array
(
[id] => 34-1
[mobile] => 880XXXXXXX
[status] => SUBMITTED
)
)
[msgid] => 981XXXXXXX
[message] => message Submitted successfully
)
Error Response
{
"status":"AZQ02",
"message":"Invalid Api Key"
}
Response Data
Page 32
API Error Codes
The common error codes received while using the API to send an SMS is in the below format
STATUS MESSAGE
Page 33
10. Template API
Mandatory Parameters
The mandatory parameters in the HTTP API are tabulated below:
Optional Parameters
The optional parameters in the HTTP API are tabulated below
Page 34
Example Responses
JSON
{
"status": true,
"data": [
{
"templateName":"Test Template1",
"peId":"110235XXXXXXXXXXXX",
"templateId":"1107159XXXXXXXXXXX",
"unicodeType":"normal",
"templateData":"Dear {#var#} thanks1.",
"status":"Active"
},
{
"templateName":"Test Template2",
"peId":"110235XXXXXXXXXXXX",
"templateId":"1107159XXXXXXXXXXX",
"unicodeType":"normal",
"templateData":"Dear {#var#} thanks2.",
"status":"Active"
}
],
"message": "Success"
}
Error Response
{
"status":"AZQ01",
"message":"Kindly provide apikey"
}
Response Data
Page 35
11. Sender ID API
Getting Senderid
http://msg.mtalkz.com/V2/http-senderid-api.php?apikey=XXXXXXXXXXXXXXXX
Mandatory Parameters
The mandatory parameters in the HTTP API are tabulated below:
Example Responses
JSON
{
"status": true,
"data": [
{
"senderid":"XXXXXX",
"status":"Active"
},
{
"senderid":"XXXXXX",
"status":"Active"
}
],
"message": "Success"
}
Error Response
{
"status":"AZQ01",
"message":"Kindly provide apikey"
}
Page 36
Response Data
STATUS MESSAGE
Page 37