https://www.titanly.net/api/sms/predefinedMessages/addPredefinedMessages.php
Add Predefined Msg
Add or edit a new predefined message to your account. There are dynamic variables available for these message.
Name | Status | Description |
---|---|---|
ApiKey | Required | Your company Api Key which can be found in the dashboard under account. |
Name | Required | The name of the predefined message |
Message | Required | The predefined message text. |
Name | Status | Description |
---|---|---|
predefinedId | Payload | This is the ID of the Predefined message you just created. |
Base Example
PHP
<?php //Setup Variables $url = "https://www.titanly.net/api/sms/predefinedMessages/addPredefinedMessages.php"; $fields['ApiKey'] = urlencode('Your API Key'); $fields['Name'] = urlencode('Name of the message for later identification'); $fields['Message'] = urlencode('The message'); //Turn the $fields array into a POST string. $fieldString = ''; foreach($fields as $key=>$value) { $fieldString .= $key.'='.$value.'&'; } rtrim($fieldString, '&'); // Use Curl To send the reqeust $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, count($fields)); curl_setopt($ch, CURLOPT_POSTFIELDS, $fieldString); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); $userData = curl_exec($ch); $info = curl_getinfo($ch); curl_close($ch); ?>
Base Payload
Payload
<Root> <response>success</response> <message> </message> <Data> <predefinedId>123</predefinedId> </Data> </Root>