POST /v1/actions/get-template
Fetch one template's body, header, footer, buttons, and the placeholders it expects.
Returns one template with its full body, optional header/footer, buttons, and the list of placeholders extracted from the body. Use this to discover what variables a template expects before calling send-template-message.
POST /api/v1/actions/get-template
Request body
| Field | Type | Required |
|---|---|---|
template_id |
UUID | yes |
curl -X POST https://www.qyvo.io/api/v1/actions/get-template \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{"template_id": "01J0AB..."}'
const template = await fetch('https://www.qyvo.io/api/v1/actions/get-template', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QYVO_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ template_id: '01J0AB...' }),
}).then((r) => r.json());
$template = Http::withToken(env('QYVO_TOKEN'))
->post('https://www.qyvo.io/api/v1/actions/get-template', [
'template_id' => '01J0AB...',
])
->json();
import os, httpx
template = httpx.post(
'https://www.qyvo.io/api/v1/actions/get-template',
headers={'Authorization': f"Bearer {os.environ['QYVO_TOKEN']}"},
json={'template_id': '01J0AB...'},
).json()
Response — 200 OK
{
"id": "01J0AB...",
"name": "order_confirmation",
"category": "UTILITY",
"status": "APPROVED",
"languages": ["en", "fr", "es"],
"body": "Hi {{1}}, your order {{2}} ships tomorrow. Track it: {{3}}",
"header_type": "TEXT",
"header_content": "Order update",
"footer": "Reply STOP to unsubscribe.",
"buttons": [
{ "type": "URL", "text": "Track order", "url": "https://acme.com/track/{{1}}" }
],
"placeholders": ["1", "2", "3"],
"created_at": "2026-04-15T10:32:00+00:00"
}
| Field | Notes |
|---|---|
header_type |
TEXT, IMAGE, VIDEO, DOCUMENT, or null |
header_content |
The header text (for TEXT) or media URL (for media headers) |
footer |
Optional footer string, max 60 chars |
buttons |
Array of {type, text, url?, phone_number?} — types: URL, PHONE_NUMBER, QUICK_REPLY |
placeholders |
Variables the body expects, in order |
The response always reflects the first approved translation found, falling back to any translation if none are approved yet. To inspect a specific translation, use the dashboard.
