Skip to main content
PATCH
Update a template

Authorizations

Authorization
string
header
required

Project-scoped secret API key (sk_…). Pass in the Authorization: Bearer <key> header. Grants access to the project the key was issued for.

Path Parameters

templateId
integer | null

Numeric template identifier.

Example:

158

Body

application/json

Patch an existing template. The template channel is resolved from the resource when type is omitted.

data
object
required

Partial template body. The server validates this against the existing template channel before saving.

type
enum<string>

Optional channel discriminator. If supplied, it must match the existing template channel.

Available options:
email,
text,
push,
webhook,
in_app
Example:

"email"

name
string | null

Response

The updated template.

A localised, channel-specific message body bound to a campaign.

id
integer
required

Numeric template identifier.

Example:

158

project_id
integer
required

Identifier of the owning project.

campaign_id
integer
required

Identifier of the campaign this template belongs to.

Example:

24

type
enum<string>
required

Delivery channel a template is bound to.

Available options:
email,
text,
push,
webhook,
in_app
Example:

"email"

locale
string
required

BCP-47 locale this template is authored in.

Example:

"en-AU"

data
object
required

Channel-specific template body. Shape varies by type — see TemplateEmailData, TemplatePushData, etc.

created_at
string | null
required
updated_at
string | null
required
name
string | null

Optional human-readable template name.