Skip to main content
POST
Create a template

Authorizations

Authorization
string
header
required

An API key from Settings, API keys. It starts with rc_live_.

Body

application/json

Send the body as body_template (plain text) or as body_template_blocks (a document). When you send a document, the plain text is made from it and any body_template you sent beside it is ignored. One of the two is required.

key
string
required

What a send names this template by. It must be unused in your organization and cannot be changed later.

Minimum string length: 1
subject_template
string
required
Minimum string length: 1
name
string

The name people read. Trimmed, and cut to 120 characters.

body_template
string
body_template_blocks
object[]

A message written as a document: at most 200 blocks.

One block of a document. An unknown type is refused.

variables
any[]

A list kept with the template, such as the merge fields it uses.

metadata
object
status
enum<string>
default:active
Available options:
active,
draft,
archived

Response

The template, as it was created.

id
string
required
key
string
required

What a send names the template by. It cannot be changed.

channel
enum<string>
required

Always email.

Available options:
email
subject_template
string
required

The subject, with any {{merge_fields}}.

body_template
string
required

The body as plain text, with any {{merge_fields}}. When the template is written as a document, this is the document's text.

status
enum<string>
required

Only an active template can be sent or filled.

Available options:
active,
draft,
archived
created_at
string<date-time>
required
updated_at
string<date-time>
required
tenant_id
string

Your organization's ID.

name
string | null

The name people read. Null means the key stands in for it.

body_template_blocks
object[] | null

The body as a document, or null for a template written as plain text.

One block of a document. An unknown type is refused.

variables
any[]

A list kept with the template, as you last sent it.

metadata
object

Anything else you keep with the template.