Skip to main content

Read the cross-campaign rollup

A template you reuse — an order confirmation, an appointment reminder, a promo blast — gets its engagement scored here instead of campaign by campaign. Product and lifecycle marketers use this endpoint to answer “which message actually converts” before cloning the winner into the next send. Grab a template id via the templates list (or the dashboard’s campaign detail page), then fetch GET /api/v1/templates/{id}/analytics. The response consolidates the template’s engagement across every campaign that used it: headline counters (totals), conversion fractions (rates), and a per-campaign funnel (campaigns) — plus a degraded flag marking zeroed fallback responses during a transient database blip. Request
Two details change how you read the numbers. Terminal is the denominator, not sent — the delivery rate divides delivered by terminal messages (those that reached a final state), so an in-flight campaign reports an honest rate instead of a send-padded one. And degraded: true means “no data right now,” not “zero engagement” — during a transient database blip the endpoint returns a zeroed fallback with the flag set; treat it as “retry shortly.” See the template analytics guide for the walk-through on comparing template versions, spotting a delivery drop after an edit, and breaking results down by channel.

Template lifecycle samples

The examples below use the same { data, meta } response envelope as the generated operations. Template writes are tenant-scoped and require the templates:write scope. WhatsApp templates enter carrier approval after creation; do not send the template until its status is approved.

Create a template

POST /api/v1/messages/templates
Create a WhatsApp template with a text body and one variable. The components array uses WhatsApp’s component names and parameter placeholders.

Bulk locale-variant create

POST /api/v1/messages/templates/{id}/localize
Pass one to 25 target locales to auto-generate one template row per locale. The operation is copy-only: it creates and submits variants for carrier approval, selects no route, and sends no messages. Use a stable Idempotency-Key when retrying a timed-out request.

Update a template

PATCH /api/v1/messages/templates/{id}
Update editable content without changing the template’s channel. Changing WhatsApp content can return the template to carrier approval, so wait for status: "approved" before sending the revised version.

Carrier-rejected template (422)

A carrier rejection is terminal for that submission. Branch on error.code and fix the template or its tenant-owned WhatsApp configuration before submitting again; do not blind-retry the same payload.