Active Template Version - Amazon Pinpoint

Active Template Version

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.

Of the template versions, you can designate one version as the active version. The active version is the version that Amazon Pinpoint uses by default for any new messages that are based on the template. Depending on your organization's workflow for managing message templates, the active version is typically the version that's been most recently reviewed and approved for use in messages. It isn't necessarily the latest version of a template. To determine which version of a template is currently the active version, send a GET request to the appropriate resource for the template's type, and omit the version query parameter from your request. In response to your request, Amazon Pinpoint returns the version identifier and other information about the active version of the template.

You can use the Active Template Version resource to change the status of a specific version of a template to active.

URI

/v1/templates/template-name/template-type/active-version

HTTP Methods

PUT

Operation ID: UpdateTemplateActiveVersion

Changes the status of a specific version of a message template to active.

Path Parameters
Name Type Required Description
template-name String True

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-type String True

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

Header Parameters
Name Type Required Description
accept String False

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

Responses
Status Code Response Model Description
200 MessageBody

The request succeeded.

400 MessageBody

The request contains a syntax error (BadRequestException).

403 MessageBody

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

404 MessageBody

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

405 MessageBody

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

413 MessageBody

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

429 MessageBody

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

500 MessageBody

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 Active Template Version resource.

Responses
Status Code Response Model Description
200 None

The request succeeded.

Schemas

Request Bodies

Example PUT

{ "Version": "string" }

Response Bodies

Example MessageBody

{ "RequestID": "string", "Message": "string" }

Properties

MessageBody

Provides information about an API request or response.

Property Type Required Description
RequestID

string

False

The unique identifier for the request or response.

Message

string

False

The message that's returned from the API.

TemplateActiveVersionRequest

Specifies which version of a message template to use as the active version of the template.

Property Type Required Description
Version

string

False

The version of the message template to use as the active version of the template. Valid values are: latest, for the most recent version of the template; or, the unique identifier for any existing version of the template. If you specify an identifier, the value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the Template Versions resource.

See Also

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

UpdateTemplateActiveVersion