Template Versions - Amazon Pinpoint

Template Versions

A message template is a set of content and settings that you can define, save, and reuse in email messages, push notifications, SMS text messages, and voice messages for any of your Amazon Pinpoint applications. To help you develop and maintain templates, Amazon Pinpoint supports versioning for all types of message templates.

Each time you update a template, Amazon Pinpoint automatically saves your changes to (overwrites) the latest existing version of the template, unless you choose to create a new version of the template. Each version of a template is a snapshot of the template that you can use in a message.

The Template Versions resource provides information about all the versions of a specific message template. This information includes the unique identifier, creation and modification dates, and settings for each version of the template.

You can use the Template Versions resource to retrieve information about all the versions of a specific message template.

URI

/v1/templates/template-name/template-type/versions

HTTP methods

GET

Operation ID: ListTemplateVersions

Retrieves information about all the versions of a specific message template.

Path parameters
NameTypeRequiredDescription
template-nameStringTrue

The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.

template-typeStringTrue

The type of channel that the message template is designed for. Valid values are: EMAIL, PUSH, SMS, and VOICE.

Header parameters
NameTypeRequiredDescription
acceptStringFalse

Indicates which content types, expressed as MIME types, the client understands.

Query parameters
NameTypeRequiredDescription
page-sizeStringFalse

The maximum number of items to include in each page of a paginated response. This parameter is not supported for application, campaign, and journey metrics.

next-tokenStringFalse

The string that specifies which page of results to return in a paginated response. This parameter is not supported for application, campaign, and journey metrics.

Responses
Status codeResponse modelDescription
200TemplateVersionsResponse

The request succeeded.

400MessageBody

The request contains a syntax error (BadRequestException).

403MessageBody

The request was denied because access to the specified resource is forbidden (ForbiddenException).

404MessageBody

The request failed because the specified resource was not found (NotFoundException).

405MessageBody

The request failed because the method is not allowed for the specified resource (MethodNotAllowedException).

413MessageBody

The request failed because the payload for the body of the request is too large (RequestEntityTooLargeException).

429MessageBody

The request failed because too many requests were sent during a certain amount of time (TooManyRequestsException).

500MessageBody

The request failed due to an unknown internal server error, exception, or failure (InternalServerErrorException).

OPTIONS

Retrieves information about the communication requirements and options that are available for the Template Versions resource.

Path parameters
NameTypeRequiredDescription
template-nameStringTrue

The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.

template-typeStringTrue

The type of channel that the message template is designed for. Valid values are: EMAIL, PUSH, SMS, and VOICE.

Responses
Status codeResponse modelDescription
200None

The request succeeded.

Schemas

Response bodies

{ "RequestID": "string", "Message": "string", "Item": [ { "TemplateName": "string", "TemplateType": "string", "CreationDate": "string", "LastModifiedDate": "string", "TemplateDescription": "string", "DefaultSubstitutions": "string", "Version": "string" } ], "NextToken": "string" }
{ "RequestID": "string", "Message": "string" }

Properties

MessageBody

Provides information about an API request or response.

PropertyTypeRequiredDescription
Message

string

False

The message that's returned from the API.

RequestID

string

False

The unique identifier for the request or response.

TemplateVersionResponse

Provides information about a specific version of a message template.

PropertyTypeRequiredDescription
CreationDate

string

True

The date, in ISO 8601 format, when the version of the message template was created.

DefaultSubstitutions

string

False

A JSON object that specifies the default values that are used for message variables in the version of the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.

LastModifiedDate

string

True

The date, in ISO 8601 format, when the version of the message template was last modified.

TemplateDescription

string

False

The custom description of the version of the message template.

TemplateName

string

True

The name of the message template.

TemplateType

string

True

The type of channel that the message template is designed for. Possible values are: EMAIL, PUSH, SMS, and VOICE.

Version

string

False

The unique identifier for the version of the message template. This value is an integer that Amazon Pinpoint automatically increments and assigns to each new version of a template.

TemplateVersionsResponse

Provides information about all the versions of a specific message template.

PropertyTypeRequiredDescription
Item

Array of type TemplateVersionResponse

True

An array of responses, one for each version of the message template.

Message

string

False

The message that's returned from the API for the request to retrieve information about all the versions of the message template.

NextToken

string

False

The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.

RequestID

string

False

The unique identifier for the request to retrieve information about all the versions of the message template.

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

ListTemplateVersions