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
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.

Responses
Status codeResponse modelDescription
200MessageBody

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

Request bodies

{ "Version": "string" }

Response bodies

{ "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.

TemplateActiveVersionRequest

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

PropertyTypeRequiredDescription
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