Skip to content

List all template versions (Deprecated)

Request

List all template versions.

Deprecated in favor of /v2/communicator/templates.

This dumps all template versions (regardless of active status) without paging.

Security
oauth2(Required scopes: communicator.template:read) or bearerAuth or apiKeyHeader
Query
companyIdstring(CompanyId)CP-[A-Z0-9]{4}-[A-Z0-9]{4}

The Company ID by which to filter.

Example:companyId=CP-AAAA-BBBB
GET
/communicator/templates
curl -i -X GET \
  'https://sandboxapi.peach.finance/api/communicator/templates?companyId=CP-AAAA-BBBB' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
Array [
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}}" } ]