Edit an existing keyword.




 keywordThe first word of a text messageYES
 numberThe dedicated virtual number that the keyword belongs toYES
 referenceYour own reference (up to 100 characters)NO
 statusOpen, will set the Keyword to being active. Closed, will close the Keyword.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 https://api.transmitsms.com/edit-keyword.json \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d 'keyword=NEWS' \
  -d 'reference=Gym news' \
  -d 'number=61491570156' \
  -d 'status=active' \
  -d list_id=0 \
  -d "welcome_message=Welcome to Mike's gym news" \
  -d 'members_message=Thanks for your continued support' \
  -d 'forward_url=http://example.com/gym-promo' \
  -d 'forward_email=news@http://example.com,mike@http://example.com' \
  -d 'forward_sms=61491570157,61491570158'

JSON Response

  keyword: "NEWS",
  reference: "Gym news",
  number: "61491570156",
  status: "active",
  list_id: 0,
  welcome_message: "Welcome to Mike's gym news",
  members_message: "Thanks for your continued support",
  forward_url: "http://example.com/gym-promo",
  forward_email: "news@example.com,mike@example.com",
  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';
 $ap i= new transmitsmsAPI('API_KEY','API_SECRET');
 //pause a keyword
 //$result = $api->editKeyword('KEYWORD', '6140000000', null, null, null, null, 'paused');
 //change welcome message
 $result = $api->editKeyword('KEYWORD','6140000000', null, null, 'new welcome message');
 if ($result->error->code == 'SUCCESS') {
   echo 'Keyword saved';

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