/templates/email/{uuid}
Get details for a particular email template.
Headers
Name | Required | Type | Description |
---|---|---|---|
X-AUTH-TOKEN | * | string |
An authentication token provided to you by GovDelivery. |
Body
Example
{
"id": "1",
"uuid": "template-1",
"body": "hello world",
"subject": "This is a subject.",
"link_tracking_parameters": "test=ok&hello=world",
"macros": {
"HI": "WORLD"
},
"open_tracking_enabled": true,
"click_tracking_enabled": true,
"created_at": "2012-10-31T20:04:46Z",
"_links": {
"self": "/templates/email/template-1",
"account": "/accounts/1",
"from_address": "/from_addresses/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
|
subject | string |
The subject of the template. Example
|
link_tracking_parameters | string |
The parameters to be appended to links for tracking purposes. It should be url query encoded. Example
|
macros | object |
Macros to resolve. Example
|
open_tracking_enabled | boolean |
Whether open tracking is enabled for the email template. Example
|
click_tracking_enabled | boolean |
Whether click tracking is enabled for the email template. Example
|
message_type_code | string |
The code of the message_type 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": "Email 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"
},
"subject": {
"description": "The subject of the template.",
"type": "string",
"example": "This is an email."
},
"link_tracking_parameters": {
"description": "The parameters to be appended to links for tracking purposes. It should be url query encoded.",
"type": "string",
"example": "test=ok&hello=world"
},
"macros": {
"description": "Macros to resolve.",
"type": "object",
"example": "{\"GD_TOPIC\": \"Test topic\"}"
},
"open_tracking_enabled": {
"description": "Whether open tracking is enabled for the email template.",
"type": "boolean",
"example": "true"
},
"click_tracking_enabled": {
"description": "Whether click tracking is enabled for the email template.",
"type": "boolean",
"example": "true"
},
"message_type_code": {
"description": "The code of the message_type",
"type": "string",
"example": "salutations"
},
"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"
},
"from_address": {
"description": "Relative URI of the from address.",
"type": "string",
"example": "/from_addresses/2"
},
"message_type": {
"description": "Relative URI of the message type.",
"type": "string",
"example": "/message_types/2"
}
}
}
}
}
Body
Example
{
"error": "Invalid authentication token"
}
Update an email template with partial update.
Headers
Name | Required | Type | Description |
---|---|---|---|
X-AUTH-TOKEN | * | string |
An authentication token provided to you by GovDelivery. |
Body
Example
{
"subject": "This is a new subject.",
"_links": {
"from_address": "2"
}
}
Schema
Name | Required | Type | Description |
---|---|---|---|
body | string |
Template body will comprise email content. Example
|
|
subject | string |
Subject associated with the template. Example
|
|
link_tracking_parameters | string |
Link tracking parameters associated with the template. Example
|
|
macros | string |
Macros associated with the template. Example
|
|
open_tracking_enabled | boolean |
Whether open tracking is enabled for this template. |
|
click_tracking_enabled | boolean |
Whether click tracking is enabled for this template. Example
|
|
message_type_code | string |
The unique identifier of the Message Type to associate with this template. A Message Type will be created if it doesn’t exist. The Message Type’s label will be generated from this value, and can be updated via the Message Type resource. |
|
_links | string |
The links to be associated with this template. Possible parameters are:
Example
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "/templates/email/{uuid}",
"description": "Update an email template with partial update.",
"type": "object",
"properties": {
"body": {
"description": "Template body will comprise email content.",
"type": "string",
"example": "[HELLO]"
},
"subject": {
"description": "Subject associated with the template.",
"type": "string",
"example": "Test Subject from TMS Templates!"
},
"link_tracking_parameters": {
"description": "Link tracking parameters associated with the template.",
"type": "string",
"example": "hello=world&test=true"
},
"macros": {
"description": "Macros associated with the template.",
"type": "string",
"example": "{\n \"HELLO\": \"WORLD\"\n}\n"
},
"open_tracking_enabled": {
"description": "Whether open tracking is enabled for this template.",
"type": "boolean",
"example": false
},
"click_tracking_enabled": {
"description": "Whether click tracking is enabled for this template.",
"type": "boolean",
"example": true
},
"message_type_code": {
"description": "The unique identifier of the Message Type to associate\nwith this template. A Message Type will be created if it doesn't\nexist. The Message Type's label will be generated from this value,\nand can be updated via the Message Type resource.\n",
"type": "string"
},
"_links": {
"description": "The links to be associated with this template.\n\nPossible parameters are:\n\n- from_address\n - Required: No\n - Id of the from address to associate to the template.\n",
"type": "string",
"example": "{\n \"from_address\": \"1\"\n}\n"
}
}
}
Form Parameters
Name | Required | Type | Description |
---|---|---|---|
body | string |
Template body will comprise email content. Example
|
|
subject | string |
Subject associated with the template. Example
|
|
link_tracking_parameters | string |
Link tracking parameters associated with the template. Example
|
|
macros | string |
Macros associated with the template. Example
|
|
open_tracking_enabled | boolean |
Whether open tracking is enabled for this template. |
|
click_tracking_enabled | boolean |
Whether click tracking is enabled for this template. Example
|
|
message_type_code | string |
The unique identifier of the Message Type to associate with this template. A Message Type will be created if it doesn’t exist. The Message Type’s label will be generated from this value, and can be updated via the Message Type resource. |
|
_links | string |
The links to be associated with this template. Possible parameters are:
Example
|
Description
OK
Body
Example
{
"error": "Invalid authentication token"
}
Update an email template with partial update.
Headers
Name | Required | Type | Description |
---|---|---|---|
X-AUTH-TOKEN | * | string |
An authentication token provided to you by GovDelivery. |
Body
Example
{
"subject": "This is a new subject.",
"_links": {
"from_address": "2"
}
}
Schema
Name | Required | Type | Description |
---|---|---|---|
body | string |
Template body will comprise email content. Example
|
|
subject | string |
Subject associated with the template. Example
|
|
link_tracking_parameters | string |
Link tracking parameters associated with the template. Example
|
|
macros | string |
Macros associated with the template. Example
|
|
open_tracking_enabled | boolean |
Whether open tracking is enabled for this template. |
|
click_tracking_enabled | boolean |
Whether click tracking is enabled for this template. Example
|
|
message_type_code | string |
The unique identifier of the Message Type to associate with this template. A Message Type will be created if it doesn’t exist. The Message Type’s label will be generated from this value, and can be updated via the Message Type resource. |
|
_links | string |
The links to be associated with this template. Possible parameters are:
Example
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "/templates/email/{uuid}",
"description": "Update an email template with partial update.",
"type": "object",
"properties": {
"body": {
"description": "Template body will comprise email content.",
"type": "string",
"example": "[HELLO]"
},
"subject": {
"description": "Subject associated with the template.",
"type": "string",
"example": "Test Subject from TMS Templates!"
},
"link_tracking_parameters": {
"description": "Link tracking parameters associated with the template.",
"type": "string",
"example": "hello=world&test=true"
},
"macros": {
"description": "Macros associated with the template.",
"type": "string",
"example": "{\n \"HELLO\": \"WORLD\"\n}\n"
},
"open_tracking_enabled": {
"description": "Whether open tracking is enabled for this template.",
"type": "boolean",
"example": false
},
"click_tracking_enabled": {
"description": "Whether click tracking is enabled for this template.",
"type": "boolean",
"example": true
},
"message_type_code": {
"description": "The unique identifier of the Message Type to associate\nwith this template. A Message Type will be created if it doesn't\nexist. The Message Type's label will be generated from this value,\nand can be updated via the Message Type resource.\n",
"type": "string"
},
"_links": {
"description": "The links to be associated with this template.\n\nPossible parameters are:\n\n- from_address\n - Required: No\n - Id of the from address to associate to the template.\n",
"type": "string",
"example": "{\n \"from_address\": \"1\"\n}\n"
}
}
}
Form Parameters
Name | Required | Type | Description |
---|---|---|---|
body | string |
Template body will comprise email content. Example
|
|
subject | string |
Subject associated with the template. Example
|
|
link_tracking_parameters | string |
Link tracking parameters associated with the template. Example
|
|
macros | string |
Macros associated with the template. Example
|
|
open_tracking_enabled | boolean |
Whether open tracking is enabled for this template. |
|
click_tracking_enabled | boolean |
Whether click tracking is enabled for this template. Example
|
|
message_type_code | string |
The unique identifier of the Message Type to associate with this template. A Message Type will be created if it doesn’t exist. The Message Type’s label will be generated from this value, and can be updated via the Message Type resource. |
|
_links | string |
The links to be associated with this template. Possible parameters are:
Example
|
Description
OK
Body
Example
{
"error": "Invalid authentication token"
}
Delete an email template.
Headers
Name | Required | Type | Description |
---|---|---|---|
X-AUTH-TOKEN | * | string |
An authentication token provided to you by GovDelivery. |
Description
OK
Body
Example
{
"error": "Invalid authentication token"
}