Skip to content

Templates API

Manage and use WhatsApp Message Templates — Meta-approved message formats required for sending proactive business-initiated messages.

Meta approval required: Templates must be approved by Meta before they can be sent. Approval typically takes a few minutes to 24 hours.

Overview

Templates list

Templates list — name, category, language, and approval status.

Create template

Template creation — body text with variable placeholders.

Sending a template

List Templates

GEThttps://api.vobiz.ai/v1/messaging/channels/{channel_id}/templates

Returns all templates for a specific channel. Filter by approval status using the status query parameter.

statusFilter by: APPROVED, PENDING, REJECTED (leave empty for all)

Authentication Required:

  • X-Auth-ID: Your Account Auth ID
  • X-Auth-Token: Your Account Auth Token
  • Accept: application/json
cURL — Approved templates only
curl -X GET \
  "https://api.vobiz.ai/v1/messaging/channels/{channel_id}/templates?status=APPROVED" \
  -H "X-Auth-ID: {auth_id}" \
  -H "X-Auth-Token: {auth_token}"
Response — 200 OK
{
  "data": [{
    "id": "tpl_abc123",
    "name": "order_confirmation",
    "language": "en_US",
    "category": "UTILITY",
    "status": "APPROVED",
    "components": [{"type":"BODY","text":"Your order {{1}} has been confirmed."}]
  }]
}

Create Template

POSThttps://api.vobiz.ai/v1/messaging/channels/{channel_id}/templates

Submit a new template to Meta for approval. Use double-brace numbered placeholders like {{1}}, {{2}} for dynamic content.

Authentication Required:

  • X-Auth-ID: Your Account Auth ID
  • X-Auth-Token: Your Account Auth Token
  • Accept: application/json
UTILITY
Transactional — orders, receipts, alerts
MARKETING
Promotional — offers, announcements
AUTHENTICATION
OTP and security codes only
cURL
curl -X POST \
  "https://api.vobiz.ai/v1/messaging/channels/{channel_id}/templates" \
  -H "X-Auth-ID: {auth_id}" \
  -H "X-Auth-Token: {auth_token}" \
  -H "Content-Type: application/json" \
  -d '{"name":"order_confirmation","language":"en_US","category":"UTILITY","components":[{"type":"BODY","text":"Your order {{1}} has been confirmed. Delivery: {{2}}","example":{"body_text":[["ORD-12345","March 15"]]}}]}'

Sync Templates from Meta

POSThttps://api.vobiz.ai/v1/messaging/channels/{channel_id}/templates/sync

Pulls the latest template list and statuses from Meta and updates your Vobiz account. Call this after creating templates in Meta Business Manager directly or after status changes.

Authentication Required:

  • X-Auth-ID: Your Account Auth ID
  • X-Auth-Token: Your Account Auth Token
  • Accept: application/json
cURL
curl -X POST \
  "https://api.vobiz.ai/v1/messaging/channels/{channel_id}/templates/sync" \
  -H "X-Auth-ID: {auth_id}" \
  -H "X-Auth-Token: {auth_token}"

Sending a Template Message

To send a template, use the Messages API with type: "template".

cURL — Send template message
curl -X POST \
  "https://api.vobiz.ai/v1/messaging/messages" \
  -H "X-Auth-ID: {auth_id}" \
  -H "X-Auth-Token: {auth_token}" \
  -H "Content-Type: application/json" \
  -d '{"channel_id":"{channel_id}","waba_id":"{waba_id}","to":"919876543210","type":"template","template":{"name":"order_confirmation","language":{"code":"en_US"},"category":"UTILITY","components":[{"type":"body","parameters":[{"type":"text","text":"ORD-12345"},{"type":"text","text":"March 15"}]}]}}'
Last updated: April 2026Edit this page