Menu

Transactional Templates

An HTML template that can establish a consistent design for transactional emails.

Each user can create up to 300 different transactional templates. Transactional templates are specific to accounts and subusers. Templates created on a parent account will not be accessible from the subuser accounts.

Transactional templates are templates created specifically for transactional email and are not to be confused with Marketing Campaigns designs. For more information about transactional templates, please see our Dynamic Transactional Templates documentation.

Retrieve a single transactional template.

Retrieve a single transactional template.

GET /templates/{template_id}

This endpoint allows you to retrieve a single transactional template.

Authentication

  • API Key

Headers

Authorization
string
default: Bearer <<YOUR_API_KEY_HERE>>
required
on-behalf-of
string
default: The subuser's username. This header generates the API call as if the subuser account was making the call.

Path Parameters

template_id
string
default: None
required

Responses

object
id
string

The ID of the transactional template.

format: uuidmaxLength: 36minLength: 36
required
name
string

The name for the transactional template.

maxLength: 100
required
generation
string

Defines the generation of the template.

Allowed Values: legacy, dynamic
required
updated_at
string

The date and time that this transactional template version was updated.

pattern: ^(\d{4}-\d{2}-\d{2}) ((\d{2}):(\d{2}):(\d{2}))$
required
versions
array[object]

The different versions of this transactional template.

id
string

ID of the transactional template version.

format: uuid
template_id
string

ID of the transactional template.

active
integer

Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active.

Allowed Values: 0, 1
name
string

Name of the transactional template version.

maxLength: 100
subject
string

Subject of the new transactional template version.

maxLength: 255
updated_at
string

The date and time that this transactional template version was updated.

generate_plain_content
boolean

If true, plain_content is always generated from html_content. If false, plain_content is not altered.

default: True
editor
string

The editor used in the UI.

Allowed Values: code, design
thumbnail_url
string

A Thumbnail preview of the template's html content.

warning
object
message
string

Warning message for the user

{
  "id": "0c314114-a2b7-4523-8cbc-a293d7d19007",
  "name": "example_name",
  "updated_at ": "2021-04-28 13:12:46",
  "warning": {
    "message": "Sample warning message"
  },
  "generation": "legacy",
  "versions": []
}
Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the SendGrid tag on Stack Overflow.

Thank you for your feedback!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

Refer us and get $10 in 3 simple steps!

Step 1

Get link

Get a free personal referral link here

Step 2

Give $10

Your user signs up and upgrade using link

Step 3

Get $10

1,250 free SMSes
OR 1,000 free voice mins
OR 12,000 chats
OR more