Skip to main content

Templates API

Templates endpoints exposed by the Devotel CPaaS API Base path: /api/v1/templates Endpoint count: 2

title: “Read the cross-campaign rollup” description: “What one reusable template accumulates across every campaign that sent it — totals, conversion rates, and a per-campaign funnel in a single response.”

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.

List templates

GET /api/v1/templates
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get template cross-campaign analytics

GET /api/v1/templates/{id}/analytics
string
required
—
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.