/keywords

Use this resource to view and create new keywords. Creating a keyword is one step of a two step process in configuring 2-way SMS.

Secured By: Authentication Token
Description:

Lists your keywords.

Responses with more than 50 records will be paginated to 50 records per response, unless otherwise specified.

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Status

Headers

Name Type Description
Link string

Appropriate pagination link relations. Can include “first”, “last”, “prev”, and “next” relations.

Example

< /keywords?page=1>; rel="first",
< /keywords?page=2>; rel="prev",
< /keywords?page=4>; rel="next",
< /keywords?page=5>; rel="last"

Body

Format: application/json

Example
[
  {
    "name": "services",
    "response_text": "Dial 311 to search for services in your area",
    "created_at": "2013-02-07T08:07:33Z",
    "updated_at": "2014-10-23T11:22:33Z",
    "_links": {
      "self": "/keywords/1",
      "commands": "/keywords/1/commands"
    }
  },
  {
    "name": "subscribe",
    "response_text": null,
    "created_at": "2013-02-07T08:07:11Z",
    "updated_at": "2013-11-11T15:23:39Z",
    "_links": {
      "self": "/keywords/2",
      "commands": "/keywords/2/commands"
    }
  },
  {
    "name": "weather",
    "response_text": "Current Weather Conditions",
    "created_at": "2014-12-17T18:57:44Z",
    "updated_at": "2014-12-27T14:22:37Z",
    "_links": {
      "self": "/keywords/3",
      "commands": "/keywords/3/commands"
    }
  }
]
Schema
Array of objects that may include:
Name Type Description
name string

The name of the keyword. Case-insensitive.

Example

weather
response_text string

Optional response text that will be sent back to the SMS sender in an SMS

Example

Current Weather Conditions
created_at string

The date and time when the keyword was created.

Example

2013-01-30T17:45:27Z
updated_at string

The date and time when the keyword was last updated.

Example

2013-01-30T17:45:27Z
_links object

An object that defines links to related objects.

Properties

{
  "self": {
    "description": "Relative URI of the object",
    "type": "string",
    "example": "/keywords/3"
  },
  "commands": {
    "description": "Relative URI to the commands associated with this keyword",
    "type": "string",
    "example": "/keywords/3/commands"
  }
}
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Keywords",
  "description": "List of keywords",
  "type": "array",
  "items": {
    "title": "Keyword",
    "type": "object",
    "properties": {
      "name": {
        "description": "The name of the keyword. Case-insensitive.",
        "type": "string",
        "example": "weather"
      },
      "response_text": {
        "description": "Optional response text that will be sent back to the SMS sender in an SMS",
        "type": "string",
        "example": "Current Weather Conditions"
      },
      "created_at": {
        "description": "The date and time when the keyword was created.",
        "type": "string",
        "example": "2013-01-30T17:45:27Z"
      },
      "updated_at": {
        "description": "The date and time when the keyword was last updated.",
        "type": "string",
        "example": "2013-01-30T17:45:27Z"
      },
      "_links": {
        "title": "Relational Links",
        "description": "An object that defines links to related objects.",
        "type": "object",
        "properties": {
          "self": {
            "description": "Relative URI of the object",
            "type": "string",
            "example": "/keywords/3"
          },
          "commands": {
            "description": "Relative URI to the commands associated with this keyword",
            "type": "string",
            "example": "/keywords/3/commands"
          }
        }
      }
    }
  }
}

Body

Format: application/json

Example
{
  "error": "Invalid authentication token"
}
Secured By: Authentication Token
Description:

Create a new keyword that users can text to you.

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Body

Format: application/json

Example
{
  "name": "weather",
  "response_text": "Current Weather Conditions"
}
Schema
Object that may include:
Name Required Type Description
name * string

The name of the keyword. Case-insensitive.

Example

weather
response_text string

Optional response text that will be sent back to the SMS sender in an SMS

Example

Current Weather Conditions
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "/keywords",
  "description": "Create a new keyword that users can text to you.\n",
  "type": "object",
  "properties": {
    "name": {
      "description": "The name of the keyword. Case-insensitive.",
      "type": "string",
      "example": "weather"
    },
    "response_text": {
      "description": "Optional response text that will be sent back to the SMS sender\nin an SMS\n",
      "type": "string",
      "example": "Current Weather Conditions"
    }
  },
  "required": [
    "name"
  ]
}
Form Parameters
Name Required Type Description
name * string

The name of the keyword. Case-insensitive.

Example

weather
response_text string

Optional response text that will be sent back to the SMS sender in an SMS

Example

Current Weather Conditions

Status

Description

The new keyword object

Body

Format: application/json

Example
{
  "name": "weather",
  "response_text": "Current Weather Conditions",
  "created_at": "2014-12-17T18:57:44Z",
  "updated_at": "2014-12-27T14:22:37Z",
  "_links": {
    "self": "/keywords/3",
    "commands": "/keywords/3/commands"
  }
}
Schema
Object that may include:
Name Type Description
name string

The name of the keyword. Case-insensitive.

Example

weather
response_text string

Optional response text that will be sent back to the SMS sender in an SMS

Example

Current Weather Conditions
created_at string

The date and time when the keyword was created.

Example

2013-01-30T17:45:27Z
updated_at string

The date and time when the keyword was last updated.

Example

2013-01-30T17:45:27Z
_links object

An object that defines links to related objects.

Properties

{
  "self": {
    "description": "Relative URI of the object",
    "type": "string",
    "example": "/keywords/3"
  },
  "commands": {
    "description": "Relative URI to the commands associated with this keyword",
    "type": "string",
    "example": "/keywords/3/commands"
  }
}
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Keyword",
  "type": "object",
  "properties": {
    "name": {
      "description": "The name of the keyword. Case-insensitive.",
      "type": "string",
      "example": "weather"
    },
    "response_text": {
      "description": "Optional response text that will be sent back to the SMS sender in an SMS",
      "type": "string",
      "example": "Current Weather Conditions"
    },
    "created_at": {
      "description": "The date and time when the keyword was created.",
      "type": "string",
      "example": "2013-01-30T17:45:27Z"
    },
    "updated_at": {
      "description": "The date and time when the keyword was last updated.",
      "type": "string",
      "example": "2013-01-30T17:45:27Z"
    },
    "_links": {
      "title": "Relational Links",
      "description": "An object that defines links to related objects.",
      "type": "object",
      "properties": {
        "self": {
          "description": "Relative URI of the object",
          "type": "string",
          "example": "/keywords/3"
        },
        "commands": {
          "description": "Relative URI to the commands associated with this keyword",
          "type": "string",
          "example": "/keywords/3/commands"
        }
      }
    }
  }
}

Body

Format: application/json

Example
{
  "error": "Invalid authentication token"
}