Documentation
Sign inGet started

Get an SMS template

GET
/v1/sms/templates/{template_ref}
curl -X GET "https://us1.platform.bird.com/v1/sms/templates/{template_ref}" \
  -H "Authorization: Bearer $TOKEN"
Returns a single SMS template: its body preview, category, the variables it expects (each with its accepted format), and the languages it is available in. Fetch a template before sending with it to see which parameters keys are required; an unknown reference returns a 404. To browse the whole catalogue, use List SMS templates instead.
Parameter
template_ref
string
The template's name (for example bird_otp_verification) or its smt_-prefixed id. A reference starting with smt_ resolves by id; anything else resolves by name.
Antwort-Payload
id
string
erforderlich
Unique identifier for the template.
name
object
erforderlich
The template's stable handle. Pass it (or the id) as the template reference when sending.
description
string
erforderlich
Human-readable description of what the template is for.
scope
string
erforderlich
Whether the template is a built-in Bird template (system) or one your workspace authored (workspace).
Possible values: system, workspace
category
object
erforderlich
Content classification applied to messages sent from this template.
body
string
erforderlich
The template body in its default language, shown for preview. Variable placeholders appear inline (for example {{ code }}).
variables
array of object
erforderlich
The typed slots this template fills in from the values you supply when sending.
Untergeordnete Attribute anzeigen
variables.key
string
erforderlich
The parameters key this slot is filled with.
variables.type
string
erforderlich
The value type this slot accepts. Open enum — treat any unrecognized value as a future type rather than an error. SMS templates use the typed slots (code, amount, …); email templates use text.
Possible values (may grow over time): code, ttl, count, ref, date, date_time, amount, currency, text
variables.required
boolean
erforderlich
Whether the slot must be supplied when sending. Advisory for email templates, where a missing value renders as empty rather than rejecting the send.
variables.constraint
string
erforderlich
A human-readable description of the accepted values.
available_languages
array of string
erforderlich
The languages this template is available in, as BCP-47 tags.
status
string
erforderlich
The template's lifecycle state. active means the template can be sent; every built-in Bird template is active. draft (being edited), pending (submitted for review), approved (passed review), and rejected (failed review) describe a workspace-authored template's authoring lifecycle; workspace-authored SMS templates are not available yet, so today every template is active.
Possible values: active, draft, pending, approved, rejected
draft_version_id
nullable string
erforderlich
The current editable draft version. Always null today: SMS templates are not yet versioned; present for parity with email templates.
published_version_id
nullable string
The currently published version, or null if the template has never been published. Always null today: SMS templates are not yet versioned; present for parity with email templates.
revision
nullable integer
erforderlich
The draft's revision counter. Always null today: SMS templates are not yet versioned; present for parity with email templates.
created_at
nullable string
erforderlich
When the template was created. Null for built-in templates.
updated_at
nullable string
erforderlich
When the template was last updated. Null for built-in templates.