Comment on page
POST Add Template through API
Post details are as below:
https://app-sms.online-live-support.com/api/api/smsAddTemplate.php
Variable should be passed in with format below:
Sample Data In
{"apiKey ":"abc88888888acbde","email":"[email protected]","templateTitle":" AddTemplate02Jun2020","messageContent":"Hi, add template through api on 02 June 2020.","referenceId":"567890"}
- ParamData TypeDescriptionSampleapiKeyVarcharAPI Key. (Find your API key at https://app-sms.online-live-support.com/dashboard.php My Account > Settings)abc88888888acbdeemailVarcharEmail. (Find your API key at https://app-sms.online-live-support.com/dashboard.php My Account > Settings)templateTitleVarcharTemplate title to be addAddTemplate02Jun2020messageContentTextMessage content wanted to submit for whitelistHi, add template through api on 02 June 2020.referenceIdVarcharReference ID to be return for you when status callback567890
- 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.
- Perform steps below to allow callback status after we approved or rejected your template:
- 1.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]
- 2.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
{"action":"templateStatusCallback","actionCode":"E00101","status":"Approved"," messageContent":"Hi, add template through api on 02 June 2020.","referenceId":"567890"}
- ParamData TypeDescriptionSampleactionStringReturn commandtemplateStatusCallbackactionCodeStringReturn CodeE00101statusStringTemplate statusApprovedmessageContentStringWhitelisted message contentHi, add template through api on 02 June 2020.referenceIdStringReference ID you passed to us when submit template567890*Response array encoded with JSON
Status Code | Description |
E00101 | Approved |
E00102 | Rejected |
E00103 | Others |