/templates/sms
Use this resource to create, update, delete, show, or list SMS templates.
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. |
Headers
Name | Type | Description |
---|---|---|
Link | string |
Appropriate pagination link relations. Can include “first”, “last”, “prev”, and “next” relations. Example
|
Body
Example
[
{
"id": "100",
"uuid" : "new_template-2",
"body": "SMS Template 2"
},
{
"id": "150",
"uuid" : "150",
"body": "SMS Template 3"
}
]
Schema
Name | Type | Description |
---|---|---|
id | string |
The id of the template Example
|
uuid | string |
The id of the template Example
|
body | string |
Content of the template Example
|
created_at | string |
The date and time when the template was created. Example
|
_links | object |
An object that defines links to related objects. Properties
|
{
"$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
Example
{
"error": "Invalid authentication token"
}
Create an SMS template.
Headers
Name | Required | Type | Description |
---|---|---|---|
X-AUTH-TOKEN | * | string |
An authentication token provided to you by GovDelivery. |
Body
Example
{
"uuid" : "new_template-v2",
"body": "hello world"
}
Schema
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
|
|
body | * | string |
Template body will comprise SMS content. Example
|
{
"$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
|
|
body | * | string |
Template body will comprise SMS content. Example
|
Body
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
Name | Type | Description |
---|---|---|
id | string |
The id of the template Example
|
uuid | string |
The id of the template Example
|
body | string |
Content of the template Example
|
created_at | string |
The date and time when the template was created. Example
|
_links | object |
An object that defines links to related objects. Properties
|
{
"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
Example
{
"error": "Invalid authentication token"
}