/templates/email/{uuid}

Secured By: Authentication Token
Description:

Get details for a particular email template.

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Status

Body

Format: application/json

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
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
subject string

The subject of the template.

Example

This is an email.
link_tracking_parameters string

The parameters to be appended to links for tracking purposes. It should be url query encoded.

Example

test=ok&hello=world
macros object

Macros to resolve.

Example

{
  "GD_TOPIC": "Test topic"
}
open_tracking_enabled boolean

Whether open tracking is enabled for the email template.

Example

true
click_tracking_enabled boolean

Whether click tracking is enabled for the email template.

Example

true
message_type_code string

The code of the message_type

Example

salutations
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"
  },
  "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"
  }
}
{
  "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

Format: application/json

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

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

Format: application/json

Example
{
  "subject": "This is a new subject.",
  "_links": {
    "from_address": "2"
  }
}
Schema
Object that may include:
Name Required Type Description
body string

Template body will comprise email content.

Example

[HELLO]
subject string

Subject associated with the template.

Example

Test Subject from TMS Templates!
link_tracking_parameters string

Link tracking parameters associated with the template.

Example

hello=world&test=true
macros string

Macros associated with the template.

Example

{
  "HELLO": "WORLD"
}
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

true
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:

  • from_address
    • Required: No
    • Id of the from address to associate to the template.

Example

{
  "from_address": "1"
}
{
  "$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

[HELLO]
subject string

Subject associated with the template.

Example

Test Subject from TMS Templates!
link_tracking_parameters string

Link tracking parameters associated with the template.

Example

hello=world&test=true
macros string

Macros associated with the template.

Example

{
  "HELLO": "WORLD"
}
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

true
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:

  • from_address
    • Required: No
    • Id of the from address to associate to the template.

Example

{
  "from_address": "1"
}

Status

Description

OK

Body

Format: application/json

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

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

Format: application/json

Example
{
  "subject": "This is a new subject.",
  "_links": {
    "from_address": "2"
  }
}
Schema
Object that may include:
Name Required Type Description
body string

Template body will comprise email content.

Example

[HELLO]
subject string

Subject associated with the template.

Example

Test Subject from TMS Templates!
link_tracking_parameters string

Link tracking parameters associated with the template.

Example

hello=world&test=true
macros string

Macros associated with the template.

Example

{
  "HELLO": "WORLD"
}
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

true
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:

  • from_address
    • Required: No
    • Id of the from address to associate to the template.

Example

{
  "from_address": "1"
}
{
  "$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

[HELLO]
subject string

Subject associated with the template.

Example

Test Subject from TMS Templates!
link_tracking_parameters string

Link tracking parameters associated with the template.

Example

hello=world&test=true
macros string

Macros associated with the template.

Example

{
  "HELLO": "WORLD"
}
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

true
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:

  • from_address
    • Required: No
    • Id of the from address to associate to the template.

Example

{
  "from_address": "1"
}

Status

Description

OK

Body

Format: application/json

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

Delete an email template.

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Status

Description

OK

Body

Format: application/json

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