Update a template
Updates a template’s name and channel-specific data. Channel cannot be changed once set; the request body must use the same type as the existing template.
Idempotent — pass an Idempotency-Key header to make safely retryable. On a replay the original response is returned with Idempotent-Replayed: true. See the API conventions guide for the full state machine, TTL, and mismatch behaviour.
Authorizations
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
Numeric template identifier.
158
Body
Patch an existing template. The template channel is resolved from the resource when type is omitted.
Partial template body. The server validates this against the existing template channel before saving.
Optional channel discriminator. If supplied, it must match the existing template channel.
email, text, push, webhook, in_app "email"
Response
The updated template.
A localised, channel-specific message body bound to a campaign.
Numeric template identifier.
158
Identifier of the owning project.
Identifier of the campaign this template belongs to.
24
Delivery channel a template is bound to.
email, text, push, webhook, in_app "email"
BCP-47 locale this template is authored in.
"en-AU"
Channel-specific template body. Shape varies by type — see TemplateEmailData, TemplatePushData, etc.
Optional human-readable template name.