WhatsApp message template management
List WhatsApp message templates
query Parameters
statuscategorywaba_idFilter by WhatsApp Business Account ID
List WhatsApp message templates › Responses
List of templates
idwaba_idWhatsApp Business Account ID
namelanguageBCP-47 language code (e.g. id, en_US)
categorystatuscomponentsMeta template components array (HEADER, BODY, FOOTER, BUTTONS)
created_atupdated_atmeta_template_idTemplate ID assigned by Meta
header_media_urlPublic MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)
Create a WhatsApp message template
Submits the template to Meta for review and stores it locally.
Create a WhatsApp message template › Request Body
nameLowercase letters, numbers, and underscores only. Max 512 chars.
componentsMeta template components array
languagecategoryintegration_account_idUse specific WABA account. Falls back to META_WABA_ID env var.
Create a WhatsApp message template › Responses
Template created and submitted to Meta
idwaba_idWhatsApp Business Account ID
namelanguageBCP-47 language code (e.g. id, en_US)
categorystatuscomponentsMeta template components array (HEADER, BODY, FOOTER, BUTTONS)
created_atupdated_atmeta_template_idTemplate ID assigned by Meta
header_media_urlPublic MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)
Sync templates from Meta
Downloads all templates from the WABA and upserts them locally. Optionally re-hosts header media to MinIO for persistent public URLs. Optionally scope to a specific integration account via query param.
query Parameters
integration_account_idUse specific WABA account. Falls back to META_WABA_ID env var.
Sync templates from Meta › Responses
Sync result
messagetotal_from_metasyncederrorsGet a WhatsApp template by ID
path Parameters
idGet a WhatsApp template by ID › Responses
Template details
idwaba_idWhatsApp Business Account ID
namelanguageBCP-47 language code (e.g. id, en_US)
categorystatuscomponentsMeta template components array (HEADER, BODY, FOOTER, BUTTONS)
created_atupdated_atmeta_template_idTemplate ID assigned by Meta
header_media_urlPublic MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)
Edit a template (status-aware; re-submits to Meta)
Edits a template's components/category. APPROVED/PAUSED templates are edited in place on Meta (the old approved version keeps sending until re-approval); REJECTED templates are deleted and recreated ("fix & resubmit"); templates under review (PENDING/IN_REVIEW/IN_APPEAL) return 409. Name and language are immutable. Status becomes PENDING on success.
path Parameters
idEdit a template (status-aware; re-submits to Meta) › Request Body
categoryintegration_account_idEdit a template (status-aware; re-submits to Meta) › Responses
Updated template, now PENDING re-review
idwaba_idWhatsApp Business Account ID
namelanguageBCP-47 language code (e.g. id, en_US)
categorystatuscomponentsMeta template components array (HEADER, BODY, FOOTER, BUTTONS)
created_atupdated_atmeta_template_idTemplate ID assigned by Meta
header_media_urlPublic MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)
Delete a WhatsApp template (Meta-first)
Deletes the template on Meta first (per-language, by name + hsm_id), then locally. Fails and keeps the local row if the Meta delete fails. Fails if any campaign references this template.
path Parameters
idquery Parameters
integration_account_idWABA integration account whose credentials are used to delete on Meta.
Delete a WhatsApp template (Meta-first) › Responses
Template deleted
messageBulk-send an approved template to a list of contacts
Executes as a campaign (visible in Campaigns with per-recipient delivery stats). Requires campaigns.broadcast. The template must be APPROVED; sends go through the unified outbound pipeline (issue #170).
path Parameters
idBulk-send an approved template to a list of contacts › Request Body
contact_idsvariablesPositional template variables shared by all recipients (e.g. {"1": "value"})
integration_account_idWhatsApp account to send from; defaults to the active default account
Bulk-send an approved template to a list of contacts › Responses
Bulk send executed as a campaign
messagetemplate_idcampaign_idsentfailedskippedUpdate template header media URL
Sets or replaces the header_media_url for a template. Use this when the automatic re-hosting during sync fails (e.g. expired scontent URL).
path Parameters
idUpdate template header media URL › Request Body
header_media_urlPublicly accessible URL for the header media
Update template header media URL › Responses
Header media URL updated
idwaba_idWhatsApp Business Account ID
namelanguageBCP-47 language code (e.g. id, en_US)
categorystatuscomponentsMeta template components array (HEADER, BODY, FOOTER, BUTTONS)
created_atupdated_atmeta_template_idTemplate ID assigned by Meta
header_media_urlPublic MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)