Skip to content

Keyword

The Keyword APIs allow you to manage keywords used for inbound messages.

Add

Adds a keyword. When detected at the beginning of an inbound message, the keyword is sent to your inbox for processing.

URL: base/Keyword/Add
Method: POST
{
  "Keyword": "sample string 1",
  "Type": "normal",
  "Response": "response message",
  "FinishDate": "2020-02-04T04:55:32.3122889+00:00",
  "MetaData": [
    { "RequestID": "1234567890DEFED" },
    { "OrgID": 1010 },
    { "Instance": "ETRERT" },
    { "Campaign": 1242 },
    { "TimeStamp": "2020-02-04T11:47:33.645773+00:00" }
  ]
}

Parameters

Name Description
Keyword Keyword between 3 and 50 characters. Alphanumeric only.
Type One of normal, stop, help, or info.
Response For stop, help, or info keywords, the automatic response sent to the respondent.
FinishDate The date the keyword expires. This should be in the future.
MetaData Optional metadata. See Metadata.

Campaigns

Campaigns allow special keywords, where Type equals stop, help, or info, to be matched to recipients.

The campaign is taken from the metadata by looking for the Campaign value. If a message is sent to a recipient with the same campaign value, and the keywords used have a matching campaign ID for that recipient, they are automatically matched and the specified response is used.

The campaign remains associated with the recipient until another campaign is associated.

HTTP statuses

Status Description
400 The keyword is already registered.
400 The keyword must be between 3 and 50 characters and alphanumeric only.
400 There was a problem registering the keyword. Contact DIY Surveys Support.

Delete

Deletes a keyword.

URL: base/Keyword/Delete?keyword={keyword}
Method: DELETE

Parameters

Name Description
keyword The keyword to delete from your account.

HTTP statuses

Status Description
404 The keyword is not found.
400 There was a problem deleting the keyword. Contact DIY Surveys Support.

List

Lists all keywords associated with your account.

URL: base/Keyword/List
Method: GET

Return example

[
  {
    "Keyword": "keyword",
    "FinishDate": "2020-02-04T04:55:32.3122889+00:00",
    "Type": "normal",
    "MetaData": [
      { "RequestID": "1234567890DEFED" },
      { "OrgID": 1010 },
      { "Instance": "ETRERT" },
      { "Campaign": 1242 },
      { "TimeStamp": "2020-02-04T11:47:33.645773+00:00" }
    ]
  }
]

HTTP statuses

Status Description
400 There are no active keywords registered.