Skip to main content
GET
/
v1
/
messaging
/
channels
/
{channel_id}
/
templates
Templates API
curl --request GET \
  --url https://api.example.com/v1/messaging/channels/{channel_id}/templates

Documentation Index

Fetch the complete documentation index at: https://docs.vobiz.ai/llms.txt

Use this file to discover all available pages before exploring further.

Meta approval required - Templates must be approved by Meta before they can be sent. Approval typically takes a few minutes to 24 hours.
Authentication: X-Auth-ID, X-Auth-Token, Accept: application/json

Template categories

CategoryUse case
UTILITYTransactional - orders, receipts, alerts
MARKETINGPromotional - offers, announcements
AUTHENTICATIONOTP and security codes only

List templates

GET https://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 (APPROVED, PENDING, REJECTED).
cURL
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}"
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

POST https://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.
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

POST https://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.
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
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"}
        ]
      }]
    }
  }'