Docs
/
/

Templates Management API reference

Complete reference documentation for the Templates resource.

Templates

#

Templates represent the templated contents of a message sent to an individual recipient on a specific channel.

There are no endpoints for working directly with templates, instead you must do so through modifying a workflow.

ChatTemplate

#

A chat template.

Attributes

json_body
string

A JSON template for the chat notification message payload. Only present if not using the markdown body.

markdown_body
string

The markdown body of the chat template.

summary
string

The summary of the chat template. Used by some chat apps in their push notifications.

EmailTemplate

#

An email message template.

Attributes

html_body
string

An HTML template for the email body. Required if visual_blocks is not provided. Only one of html_body or visual_blocks should be set. Supports Liquid templating with variables like {{ recipient.name }}, {{ actor.name }}, {{ vars.app_name }}, {{ data.custom_field }}, and {{ tenant.name }}. See the template variables reference for available variables.

settings
EmailTemplateSettings

The settings for the email template. Must be supplied with at least layout_key.

attachment_key
string

The object path in the workflow trigger's data payload to resolve attachments.Defaults to attachments.

layout_key
string

The key of the email layout that wraps the email template. When omitted, the email template will need to define the <html> structure.

pre_content
string

A liquid template that will be injected into the email layout above the message template content. Useful for setting variables that should be available to the email layout.

subject
string

The subject of the email. Supports Liquid templating with variables like {{ recipient.name }}, {{ actor.name }}, {{ vars.app_name }}, {{ data.custom_field }}, and {{ tenant.name }}. See the template variables reference for available variables.

text_body
string

A text template for the email body. When omitted, the email template will be autogenerated from the html_body or visual_blocks.

visual_blocks
object[]

The visual blocks that make up the email template. Required if html_body is not provided. Only one of html_body or visual_blocks should be set.

PushTemplate

#

A push notification template.

Attributes

settings
object

The settings for the push template.

delivery_type
enum(string)

The delivery type of the push notification. Set as silent to send a data-only notification. When set to silent, no body will be sent.

silentcontent
payload_overrides
string

A JSON object that overrides the payload sent to the push provider.

text_body
string

The body of the push notification.

title
string

The title of the push notification.

SmsTemplate

#

An SMS template.

Attributes

settings
object

The settings for the SMS template. Can be omitted.

text_body
string

The message of the SMS.

InAppFeedTemplate

#

An in-app feed template.

Attributes

action_buttons
object[]

The action buttons of the in-app feed message.

action
string
Required

The URI for this action.

label
string
Required

The label of the action button.

action_url
string

The URL to navigate to when the in-app feed is tapped. Can be omitted for multi-action templates, where the action buttons will be used instead.

markdown_body
string

The markdown body of the in-app feed.

RequestTemplate

#

A request template for a fetch function step.

Attributes

body
string

The body of the request. Only used for POST or PUT requests.

headers
2 possible types

The headers of the request. Can be a template string or a list of key-value pairs.

method
enum(string)

The HTTP method of the request.

getpostputdeletepatch
query_params
2 possible types

The query params of the request. Can be a template string or a list of key-value pairs.

url
string

The URL of the request.

WebhookTemplate

#

A webhook template. By default, a webhook step will use the request settings you configured in your webhook channel. You can override this as you see fit on a per-step basis.

Attributes

body
string

The body of the request. Only used for POST or PUT requests.

headers
object[]

A list of key-value pairs for the request headers. Each object should contain key and value fields with string values.

key
string
Required

The key of the header.

value
string
Required

The value of the header.

method
enum(string)

The HTTP method of the webhook.

getpostputdeletepatch
query_params
object[]

A list of key-value pairs for the request query params. Each object should contain key and value fields with string values.

key
string
Required

The key of the query param.

value
string
Required

The value of the query param.

url
string

The URL of the webhook.

New chat