Menu

Transactional Templates Versions

Represents the code for a particular transactional template. Each transactional template can have multiple versions, each version with its own subject and content. Each user can have up to 300 versions across across all templates.

For more information about transactional templates, please see our Transactional Templates documentation. You can also manage your Transactional Templates in the Dynamic Templates section of the Twilio SendGrid App.

Retrieve a specific transactional template version.

Retrieve a specific transactional template version.

GET /templates/{template_id}/versions/{version_id}

This endpoint allows you to retrieve a specific version of a 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

The ID of the original template

default: None
required
version_id
string

The ID of the template version

default: None
required

Responses

object
warnings
array[object]
message
string

Warning message for the user

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
required
html_content
string

The HTML content of the version. Maximum of 1048576 bytes allowed.

maxLength: 1048576
plain_content
string

Text/plain content of the transactional template version. Maximum of 1048576 bytes allowed.

default: <generated from html_content if left empty>maxLength: 1048576
generate_plain_content
boolean

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

default: True
subject
string

Subject of the new transactional template version.

maxLength: 255
required
editor
string

The editor used in the UI.

Allowed Values: code, design
test_data
string

For dynamic templates only, the mock json data that will be used for template preview and test sends.

id
string

ID of the transactional template version.

format: uuid
template_id
string

ID of the transactional template.

updated_at
string

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

thumbnail_url
string

A Thumbnail preview of the template's html content.

{
  "template_id": "Excepteur Ut qui",
  "active": 1,
  "name": "pariatur non incididunt commodo",
  "html_content": "dolor",
  "generate_plain_content": false,
  "subject": "aliquip nulla Ut",
  "editor": "design",
  "plain_content": "labore dolore"
}
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