Zaptickdocs
Resource

Templates

Submit, list, and track approval of WhatsApp message templates.

#About

WhatsApp templates are pre-approved by Meta and required for any business-initiated outbound message. The SDK lets you submit new templates and poll for approval status.

#Endpoints

  • GET/templatesList all templates with their Meta approval status.
  • POST/templatesSubmit a new template to Meta for approval.
GET/templates

List all templates with their Meta approval status.

SDK
TypeScript
const { templates } = await zaptick.templates.list({
  category: 'MARKETING',
  status: 'APPROVED',
  limit: 50,
});
Response
JSON
{
  "templates": [
    {
      "id": "tpl_01J3...",
      "name": "welcome_message",
      "language": "en",
      "category": "MARKETING",
      "status": "APPROVED",
      "components": [
        { "type": "BODY", "text": "Hi {{1}}, welcome to Zaptick!" }
      ]
    }
  ],
  "nextCursor": null
}
POST/templates

Submit a new template to Meta for approval.

SDK
TypeScript
await zaptick.templates.create({
  name: 'order_shipped',
  language: 'en',
  category: 'UTILITY',
  components: [
    { type: 'BODY', text: 'Hi {{1}}, your order {{2}} has shipped.' },
  ],
});
Request body
JSON
{
  "name": "order_shipped",
  "language": "en",
  "category": "UTILITY",
  "components": [
    { "type": "BODY", "text": "Hi {{1}}, your order {{2}} has shipped." }
  ]
}
Response
JSON
{ "id": "tpl_01J3...", "status": "PENDING" }