Skip to main content
POST
Create a message template

Authorizations

Authorization
string
header
required

Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.

Headers

Idempotency-Key
string

Retry-safe key; a repeat of the same request replays the first response

Maximum string length: 255

Body

application/json

Fields accepted when creating a template. Unknown fields are refused.

name
string
required

Name, shown to staff when picking a template.

Required string length: 1 - 255
content
required

The body. A string is HTML (or plain text with contentType: text). The object form is { html } and/or { blocks } in the block editor's format. An HTML block over the email size limit is refused (CONTENT_TOO_LARGE), and so is a button whose link has a {{variable}} inside the address rather than as the whole address (LINK_HAS_BURIED_VARIABLE).

Maximum string length: 500000
type
enum<string>
default:message

message: applied in the message composer. transactional: sent by automations. Decides which {{variables}} the template may use.

Available options:
message,
transactional
subject
string | null

Email subject. May use variables. null clears it.

Maximum string length: 255
previewText
string | null

The line an inbox shows after the subject. null clears it.

Maximum string length: 255
contentType
enum<string>
default:html

How a string body is read.

Available options:
html,
text

Response

Template created

A reusable message template.

id
integer
name
string
type
enum<string>

receipt is a legacy type: listed where it exists, never created.

Available options:
message,
transactional,
receipt
subject
string | null
previewText
string | null
content
object

A template body: html, blocks, or both.

contentType
enum<string>
Available options:
html,
text
systemTemplateKey
string | null

Set on the organization's own copy of a system email: the key of the email it replaces, which is then sent as this template.

translatedLocales
string[]

Locales with their own copy of this template. Per-locale copy is managed in the admin portal.

createdAt
string<date-time>
updatedAt
string<date-time>