Keyword Creation

Keywords are necessary for receiving inbound SMS messages. They serve a number of purposes, but in this example a keyword is used to opt-in to a campaign via SMS. Choose a keyword that is applicable to your campaign and can be easily texted by a subscriber.

NOTE Keywords belong to a particular channel, which in the case of the SMS channel type, means a particular short code or phone number. To discover what channels are available to your account, send an HTTP/1.1 GET the channel endpoint.
GET   https://api.3seventy.com/api/v2.1/account/{AccountId}/channel

Get the channel list with curl

curl -v --user {apiKey}:{Secret} "https://api.3seventy.com/api/v2.1/account/{AccountId}/channel" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

NOTE Choose the {ChannelId} of the channel you wish to use for your campaign and create a new keyword on this channel by sending an HTTP/1.1 POST request to the keyword resource:
POST   https://api.3seventy.com/api/v2.1/account/{AccountId}/channel/{ChannelId}/keyword


{ "name": "MYKEYWORD" }

Create a new keyword with curl

curl -v --user {apiKey}:{Secret} "https://api.3seventy.com/api/v2.1/account/{AccountId}/channel/{ChannelId}/keyword" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{ "name": "MYKEYWORD" }'


Content-Type: application/json
  "AccountId": "{AccountId}",
  "ChannelId": "{channelId}",
  "CampaignId": null,
  "CampaignId": "MYKEYWORD",
  "StatusId": 0,
  "StatusId": null,
  "Id": "{KeywordId}"

The keyword will remain reserved but inactive until a campaign is attached to it. As indicated by the null value in the keyword's CampaignId field.