/templates/sms

Use this resource to create, update, delete, show, or list SMS templates.

Secured By: Authentication Token
Description:

List SMS templates.

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

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

Body

Format: application/json

Example
[
  {
    "id": "100",
    "uuid" : "new_template-2",
    "body": "SMS Template 2"
  },
  {
    "id": "150",
    "uuid" : "150",
    "body": "SMS Template 3"
  }
]
Schema
Array of objects that may include:
Name Type Description
id string

The id of the template

Example

1
uuid string

The id of the template

Example

new-template_1
body string

Content of the template

Example

Hi
created_at string

The date and time when the template was created.

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": "/inbound/sms/2"
  },
  "account": {
    "description": "Relative URI of the account.",
    "type": "string",
    "example": "/account/2"
  }
}
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "SMS Templates",
  "description": "A list of SMS templates.",
  "type": "array",
  "items": {
    "title": "SMS Template",
    "type": "object",
    "properties": {
      "id": {
        "description": "The id of the template",
        "type": "string",
        "example": "1"
      },
      "uuid": {
        "description": "The id of the template",
        "type": "string",
        "example": "new-template_1"
      },
      "body": {
        "description": "Content of the template",
        "type": "string",
        "example": "Hi"
      },
      "created_at": {
        "description": "The date and time when the template was created.",
        "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": "/inbound/sms/2"
          },
          "account": {
            "description": "Relative URI of the account.",
            "type": "string",
            "example": "/account/2"
          }
        }
      }
    }
  }
}

Body

Format: application/json

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

Create an SMS template.

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Body

Format: application/json

Example
{
  "uuid" : "new_template-v2",
  "body": "hello world"
}
Schema
Object that may include:
Name Required Type Description
uuid string

A unique identifier (by account) that can be used to look up and reference the template. Note the unique constraint is not case-sensitive. If none is provided it defaults to the id assigned by the database.

Example

new-template_v2
body * string

Template body will comprise SMS content.

Example

hello world
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "/templates/sms",
  "description": "Create an SMS template.",
  "type": "object",
  "properties": {
    "uuid": {
      "description": "A unique identifier (by account) that can be used to look up and reference the template. Note the unique constraint is not case-sensitive. If none is provided it defaults to the id assigned by the database.",
      "type": "string",
      "example": "new-template_v2"
    },
    "body": {
      "description": "Template body will comprise SMS content.",
      "type": "string",
      "example": "hello world"
    }
  },
  "required": [
    "body"
  ]
}
Form Parameters
Name Required Type Description
uuid string

A unique identifier (by account) that can be used to look up and reference the template. Note the unique constraint is not case-sensitive. If none is provided it defaults to the id assigned by the database.

Example

new-template_v2
body * string

Template body will comprise SMS content.

Example

hello world

Status

Body

Format: application/json

Example
{
  "id": "1",
  "uuid": "template-1",
  "body": "hello world",
  "created_at": "2015-10-22T14:27:49Z",
  "_links": {
    "self": "/templates/sms/template-1",
    "account": "/accounts/1"
  }
}
Schema
Object that may include:
Name Type Description
id string

The id of the template

Example

1
uuid string

The id of the template

Example

new-template_1
body string

Content of the template

Example

Hi
created_at string

The date and time when the template was created.

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": "/inbound/sms/2"
  },
  "account": {
    "description": "Relative URI of the account.",
    "type": "string",
    "example": "/account/2"
  }
}
{
  "title": "SMS Template",
  "type": "object",
  "properties": {
    "id": {
      "description": "The id of the template",
      "type": "string",
      "example": "1"
    },
    "uuid": {
      "description": "The id of the template",
      "type": "string",
      "example": "new-template_1"
    },
    "body": {
      "description": "Content of the template",
      "type": "string",
      "example": "Hi"
    },
    "created_at": {
      "description": "The date and time when the template was created.",
      "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": "/inbound/sms/2"
        },
        "account": {
          "description": "Relative URI of the account.",
          "type": "string",
          "example": "/account/2"
        }
      }
    }
  }
}

Body

Format: application/json

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