https://www.titanly.net/api/sms/keywords/addSmsKeyword.php
Add Keyword
Add or edit a keyword for a number. Keywords are for people to respond to your messages and prompt other events, such as joining a group.
Name | Status | Description |
---|---|---|
ApiKey | Required | Your company Api Key which can be found in the dashboard under account. |
Keyword | Required | The Keyword text itself. Only numbers and letters accepted. Capitalization is ignored. |
Number | Required | The Id of the number to assign the keyword to. |
Message | Optional | Message to reply with when a keyword is received. Leave this blank if you do not wish to send any reply. |
Base Example
PHP
<?php //Setup Variables $url = "https://www.titanly.net/api/sms/keywords/addSmsKeyword.php"; $fields['ApiKey'] = urlencode('Your API Key'); $fields['Number'] = urlencode('Phone number the Keyword is associated with.'); $fields['Keyword'] = urlencode('The actual keyword'); $fields['Message'] = urlencode('ID of the contact'); //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> <keywordId>123</keywordId> </Data> </Root>