Add a keyword to an existing virtual number.

We created a new viewing experience for our SMS API documentation. It's now all in one central location. Click here to check it out!




 keywordThe first word of a text messageYES
 numberThe dedicated virtual number that the keyword belongs toYES
 referenceYour own reference (up to 100 characters)NO
ID of a list to add respondents to, list ID's can be found in the title of a list or in the list page URL
 welcome_messageSMS message to send to new membersNO
 members_messageSMS message to existing membersNO
 activateWhether to make the keyword active immediately.

Possible values:
true - activate immediately (default)
false - create the keyword but do not activate
 forward_urlForward messages to a URLNO
 forward_emailForward messages to a set of email addressesNO
 forward_smsForward messages to a set of msisdnsNO


curl \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d 'keyword=NEWS' \
  -d 'reference=Gym news' \
  -d 'number=61491570156' \
  -d 'status=active' \
  -d 'billing_date=2013-05-21' \
  -d list_id=0 \
  -d "welcome_message=Welcome to Mike's gym news" \
  -d 'members_message=Thanks for your continued support' \
  -d 'forward_url=' \
  -d ',' \
  -d 'forward_sms=61491570157,61491570158

JSON Response

  keyword: "NEWS",
  reference: "Gym news",
  number: "61491570156",
  status: "active",
  billing_date: "2013-05-21",
  list_id: 0,
  welcome_message: "Welcome to Mike's gym news",
  members_message: "Thanks for your continued support",
  forward_url: "",
  forward_email: ",",
  forward_sms: "61491570157,61491570158"

XML Response

  <reference>Gym news</reference>
  <welcome_message>Welcome to Mike&amp;#39;s gym news</welcome_message>
  <members_message>Thanks for your continued support</members_message>

PHP examples

 include '../../APIClient2.php';

 $api = new transmitsmsAPI('API_KEY', 'API_SECRET');
 $result = $api->addKeyword('KEYWORD', '6140000000', '', 1234,
    'hi there new member', 'hi, you are already registered');
if ($result->error->code == 'SUCCESS') {
    echo"Keyword added";

} else {
    echo"Error: {$result->error->description}";