POST Add Template through API
Post details are as below:
Variable should be passed in with format below:
Sample Data In
Param
Data Type
Description
Sample
apiKey
Varchar
abc88888888acbde
templateTitle
Varchar
Template title to be add
AddTemplate02Jun2020
messageContent
Text
Message content wanted to submit for whitelist
Hi, add template through api on 02 June 2020.
referenceId
Varchar
Reference ID to be return for you when status callback
567890
To be more secure, only POST method is accepted, GET method will not be accepted. ** apiKey, email, templateTitle and messageContent is necessary to pass in, but referenceId is not compulsary. If referenceId is passed from your site, we will return the same referenceId when callback for template status. ** Add template through API will be consider as submitted.
Return submitted template status to client site
Perform steps below to allow callback status after we approved or rejected your template:
Pass your return URL to u For example: https://app-sms.online-live-support.com/callback/receiveCallbackStatus.php https://app-sms.online-live-support.com => [website URL] callback/receiveCallbackStatus.php => [file path]
Tick the checkbox name as "Enable SMS Add Template Status Callback" at settings -> SMS Template Status Through API Callback section
Details below will be returned: Sample Data Return
Param
Data Type
Description
Sample
action
String
Return command
templateStatusCallback
actionCode
String
Return Code
E00101
status
String
Template status
Approved
messageContent
String
Whitelisted message content
Hi, add template through api on 02 June 2020.
referenceId
String
Reference ID you passed to us when submit template
567890
*Response array encoded with JSON
Status Code List
Status Code
Description
E00101
Approved
E00102
Rejected
E00103
Others
Last updated
Was this helpful?