Create an email template
POST
/v1/email/templates
curl -X POST "https://us1.platform.bird.com/v1/email/templates" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Creates a template and its initial editable draft. The body carries the template's name, category, authoring format (source), and the draft's content (subject, html, text). A name already used in the workspace returns a conflict.
Corpo da requisição
name
string
obrigatório
Human-readable template name, unique within the workspace.
alias
string
Optional workspace-unique slug handle for the template — a stable alternative to the template ID when sending by template. Lowercase letters, numbers, and hyphens.
description
string
Optional description of the template's purpose.
category
string
obrigatório
Whether the template is transactional or marketing email.
source
object
obrigatório
The authoring format the template is written in, fixed at creation. liquid currently supports variable substitution only (e.g. {{ first_name }}); filters, tags, and control flow are not yet supported — fuller Liquid support is coming soon.
subject
string
The email subject line for the initial draft.
html
string
The HTML body — the source markup for the chosen format.
text
string
The optional plain-text body.
brand_kit_id
string
Optional brand kit to apply to the draft.
Payload de resposta
id
string
obrigatório
Template ID.
workspace_id
string
obrigatório
Workspace that owns the template.
name
string
obrigatório
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
obrigatório
Whether the template is transactional or marketing email.
source
string
obrigatório
The authoring format the template is written in. Fixed at creation.
draft_version_id
string
obrigatório
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
obrigatório
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
obrigatório
When the template was created.
updated_at
string
obrigatório
When the template was last modified.