Documentation

Working with Keywords

The keyword object has methods that facilitate the use of multiple keywords within a client account. Keywords are the text labels used to identify campaigns within shortcodes: keywords must be unique within shortcodes, but each shortcode can have as many keywords assigned as necessary.  For this reason, the keyword object has methods to check the availability of a given keyword on either the default shortcode for the client or a specified shortcode, in the event that the client has more than one shortcode to choose from.

Once a keyword has been checked to assure availability, that keyword can be added to either the default campaign, or to a specified campaign in the case where the client has more than one campaign.  If a keyword is assigned to a campaign, it can also be removed, which frees up the keyword for reuse by any client on that shortcode. 

A primary feature and purpose of the keyword API object is to allow multiple keywords to be bound to the same campaign.  For instance, if developer 'Bob' has a  campaign 1234 which has the default keyword 'january' on shortcode 31313, then when a user texts in 'january' to the shortcode 31313, the campaign 1234 will react to the input, and return a callback to the URL provided by  developer Bob.  Bob could then use the keyword.check API call to make sure that the keyword 'february' is available on shortcode 31313, and then the keyword.add API call to bind 'february' to Bob's campaign 1234.  In this way a campaign can have multiple keywords covering different use cases.

You can download a pdf version of the full API reference here: Mogreet Messaging System API 4.01.pdf


keyword.list

Use the list method to enumerate all the keywords which belong to a given client. This call is useful for checking to see if a given list exists already, or just to check out what lists you do have access to. A successful call will return an HTTP 200 with XML response.
Note that there is always one MASTER keyword per campaign. The default keyword is marked with the attribute 'master="true"'. Master keywords cannot be deleted. All other keywords are identified with the attribute 'master="false"'

Request:

https://api.mogreet.com/cm/keyword.list

keyword.check

Use the keyword.check method to test whether a provided keyword is already in use on the given shortcode.

Request:

https://api.mogreet.com/cm/keyword.check

keyword.add

Use the keyword.add method to bind another keyword to an existing campaign. MO (mobile originated) SMS or MMS messages which begin with that keyword will be routed to the given campaign and handled there.

Request:

https://api.mogreet.com/cm/keyword.add

keyword.remove

Use the keyword.remove method to remove a keyword from an existing campaign. The keyword will become available for other campaigns on the same shortcode.

Request:

https://api.mogreet.com/cm/keyword.remove