Skip to content

Get template version

Request

Security
oauth2(Required scopes: communicator.template:read) or bearerAuth or apiKeyHeader
Path
templateVersionIdstring(TemplateVersionId)TV-[A-Z0-9]{4}-[A-Z0-9]{4}required

The Template Version ID.

Example:TV-AAAA-BBBB
GET
/communicator/templates/{templateVersionId}
curl -i -X GET \
  https://sandboxapi.peach.finance/api/communicator/templates/TV-AAAA-BBBB \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idstring(TemplateVersionId)TV-[A-Z0-9]{4}-[A-Z0-9]{4}
Example:"TV-AAAA-BBBB"
activateboolean

Only applies when creating a template version. If true, the newly created version is immediately set as the active version of its template descriptor, equivalent to calling the activate endpoint in a separate request.

Setting this to true requires the communicator.template:activate permission in addition to communicator.template:create. This field is ignored on update.

Default:false
contentHtmlTemplatestring or null(ContentHtmlTemplate)

A valid Jinja template to use for the content HTML body. This is used, for instance, for the body of an HTML email.

This is simply ignored when the channel does not need HTML content.

The context variables available to this template are the same as the context available to contentTextTemplate

Example:"Hello,<br/><p>{{foobar}}</p>"
contentTextTemplatestring or null(ContentTextTemplate)

A valid Jinja template to use for the content text body. This is used, for instance, for the body of a plain text email or text message.

Example:"Hello {{foobar}}"
descriptorIdstring(TemplateDescriptorId)TD-[A-Z0-9]{4}-[A-Z0-9]{4}

ID of the Template Descriptor

Example:"TD-AAAA-BBBB"
subjectLineTemplatestring or null(SubjectLineTemplate)

A valid Jinja template to use for the subject line. This is used, for instance, for the subject line when sending emails.

This is simply ignored when the channel does not need a subject.

The context variables available to this template are the same as the context available to contentTextTemplate

Example:"Hello {{foobar}}"
Response
{ "id": "TV-AAAA-BBBB", "activate": false, "contentHtmlTemplate": "Hello,<br/><p>{{foobar}}</p>", "contentTextTemplate": "Hello {{foobar}}", "descriptorId": "TD-AAAA-BBBB", "subjectLineTemplate": "Hello {{foobar}}" }