Documentation

Templates

Templates are the messages Meta approves for sending outside the 24-hour window. GET /templates lists the mirror of your WABA, including templates created in WhatsApp Manager; POST /templates creates one with Meta's components format and, by default, submits it for review right away.

curl -X POST https://zaiped.com/v1/templates \
  -H "Authorization: Bearer zp_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "order_update",
    "language": "pt_BR",
    "category": "UTILITY",
    "components": [
      { "type": "BODY", "text": "Olá, seu pedido saiu para entrega." }
    ]
  }'
  • Names are lowercase letters, digits and underscores; the pair name and language is unique.
  • Variables go in the BODY text between double curly braces, numbered (1, 2) or named (name), exactly as in WhatsApp Manager; the send call fills them through values.
  • Approval takes minutes to hours and arrives as a template.status event. Send only templates with status APPROVED.
  • PUT /templates/{templateId} edits a submitted template (Meta re-reviews); POST .../unpause asks to resume one paused for quality; DELETE removes it here and in the WABA.
  • POST /templates/sync re-reads the WABA, which is how templates created elsewhere show up between the hourly reconciliation runs.