Skip to main content
The templates:manage scope unlocks five tools for working with WhatsApp message templates. Sapot Chat proxies these to the Meta WhatsApp Cloud API, so the tools speak Meta’s component schema and inherit Meta’s approval workflow.
Creating, updating, and deleting templates requires a WhatsApp Cloud API inbox and an admin-level agent token. Other WhatsApp providers (360dialog / Twilio) can still sync and list templates, but not run CRUD through these tools.

Before you start

  • Inbox: every tool takes an inbox_id. For CRUD it must be a WhatsApp Cloud API inbox.
  • Categories: Meta requires one of MARKETING, UTILITY, or AUTHENTICATION.
  • Approval is out of band: new and edited templates come back PENDING. Meta approves (or rejects) asynchronously — you cannot force approval through the API. Re-list later to see the updated status.
  • template_id is Meta’s id, not the template name. Read it as the id field on a template object returned by list_whatsapp_templates. Deletes, however, are by name (see below).

list_whatsapp_templates

List an inbox’s WhatsApp templates, fetched live from Meta. Optional filters narrow the set Meta-side. Returns {templates: [...Meta template objects...], paging: {...}}.

create_whatsapp_template

Submit a new template to Meta for approval. Returns {template: {id, name, status, category}}. status is usually PENDING.
components follow Meta’s component schema. A minimal body-only example:
Header, footer, and button components follow the same schema as the Meta API.

update_whatsapp_template

Edit an existing template’s category and/or components. This re-submits the template to Meta. Returns Meta’s edit response.
Editing an approved template sends it back to PENDING — the previous version stops being usable until Meta re-approves the edit.

delete_whatsapp_template

Delete a template from Meta by name. Returns {} on success.
Delete is the one tool keyed on the name, not the Meta id — and it removes every language variant registered under that name.

sync_whatsapp_templates

Pull the latest templates from Meta into the inbox’s cached template list. Returns {message: "..."}.
The sync runs asynchronously in the background. Call list_whatsapp_templates a moment afterwards to see the refreshed set — the sync response itself only confirms the job was enqueued.

Typical workflow

1

Draft and submit

Build the components per Meta’s schema, then create_whatsapp_template. Expect status: PENDING.
2

Wait for Meta

Approval happens out of band. Poll with list_whatsapp_templates(status="APPROVED") — you cannot force it.
3

Refresh the cache

If templates were changed in Meta Business Manager directly, sync_whatsapp_templates, then re-list.

Errors you may see

Only allowed, successful (2xx) calls count against your plan’s quota; denied or failed requests never consume it.

Connect

Authentication & Scopes

How agent keys authenticate and the default-deny scope model.

The Agent Skill

Install the companion skill so the agent drives these tools correctly.