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"}
  • Param
    Data Type
    Description
    Sample
    apiKey
    Varchar
    API Key. (Find your API key at https://app-sms.online-live-support.com/dashboard.php My Account > Settings)
    abc88888888acbde
    email
    Varchar
    Email. (Find your API key at https://app-sms.online-live-support.com/dashboard.php My Account > Settings)
    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:
    1. 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. 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"}
  • 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