Update an email template
PATCH
/v1/email/templates/{template_id}
curl -X PATCH "https://us1.platform.bird.com/v1/email/templates/{template_id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Updates a template's metadata and its draft content. Only the fields you send are changed. Send the draft revision you last read; if it is stale (someone else edited the draft first) the request returns a conflict so you can reload and retry.
请求载荷
revision
integer
必填
The draft revision you last read (from the template's revision field). A stale value returns a conflict so you can reload and retry.
name
string
New template name. Must stay unique within the workspace.
alias
nullable string
New workspace-unique slug handle for send-by-template. Send null to clear it. Lowercase letters, numbers, and hyphens.
description
nullable string
New description of the template's purpose. Send null to clear it.
subject
nullable string
New email subject line for the draft. Send null to clear it.
html
string
New HTML body — the source markup for the template's format.
text
nullable string
New plain-text body for the draft. Send null to clear it.
brand_kit_id
string
Brand kit to apply to the draft.
响应载荷
id
string
必填
Template ID.
workspace_id
string
必填
Workspace that owns the template.
name
string
必填
Human-readable template name, unique within the workspace.
alias
nullable string
The template's workspace-unique slug handle for send-by-template, or null if unset.
description
nullable string
Optional description of the template's purpose. Null when unset.
category
string
必填
Whether the template is transactional or marketing email.
source
string
必填
The authoring format the template is written in. Fixed at creation.
draft_version_id
string
必填
The current editable draft version.
published_version_id
nullable string
The currently published version, or null if the template has never been published.
revision
integer
必填
The draft's revision counter. Send it back on the next update to detect concurrent edits.
subject
nullable string
The draft's email subject line. Null when unset.
html
nullable string
The draft's HTML body. Null when unset.
text
nullable string
The draft's plain-text body. Null when unset.
brand_kit_id
nullable string
The brand kit applied to the draft, or null if none.
created_at
string
必填
When the template was created.
updated_at
string
必填
When the template was last modified.