Chatqus CRM API

WA Templates

Server

WhatsApp message template management


List WhatsApp message templates

GET
https://api-chat.misindo.id
/api/wa-templates

List WhatsApp message templates › query Parameters

status
​string · enum
Enum values:
APPROVED
PENDING
REJECTED
PAUSED
DISABLED
category
​string · enum
Enum values:
MARKETING
UTILITY
AUTHENTICATION
waba_id
​string

Filter by WhatsApp Business Account ID

List WhatsApp message templates › Responses

List of templates

id
​string · uuid · required
waba_id
​string · required

WhatsApp Business Account ID

name
​string · required
language
​string · required

BCP-47 language code (e.g. id, en_US)

category
​string · enum · required
Enum values:
MARKETING
UTILITY
AUTHENTICATION
status
​string · enum · required
Enum values:
APPROVED
PENDING
REJECTED
PAUSED
DISABLED
components
​required

Meta template components array (HEADER, BODY, FOOTER, BUTTONS)

created_at
​string · date-time · required
updated_at
​string · date-time · required
meta_template_id
​string

Template ID assigned by Meta

header_media_url
​string

Public MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)


Create a WhatsApp message template

POST
https://api-chat.misindo.id
/api/wa-templates

Submits the template to Meta for review and stores it locally. A BUTTONS component containing a FLOW button additionally requires wa_flows.manage (403) and the Flow must be PUBLISHED and available in the catalog for the template's own WABA (422).

Create a WhatsApp message template › Request Body

name
​string · required

Lowercase letters, numbers, and underscores only. Max 512 chars.

components
​required

Meta template components array

language
​string
Default: id
category
​string · enum
Enum values:
MARKETING
UTILITY
AUTHENTICATION
Default: MARKETING
integration_account_id
​string · uuid

Use specific WABA account. Falls back to META_WABA_ID env var.

Create a WhatsApp message template › Responses

Template created and submitted to Meta

id
​string · uuid · required
waba_id
​string · required

WhatsApp Business Account ID

name
​string · required
language
​string · required

BCP-47 language code (e.g. id, en_US)

category
​string · enum · required
Enum values:
MARKETING
UTILITY
AUTHENTICATION
status
​string · enum · required
Enum values:
APPROVED
PENDING
REJECTED
PAUSED
DISABLED
components
​required

Meta template components array (HEADER, BODY, FOOTER, BUTTONS)

created_at
​string · date-time · required
updated_at
​string · date-time · required
meta_template_id
​string

Template ID assigned by Meta

header_media_url
​string

Public MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)


Sync templates from Meta

POST
https://api-chat.misindo.id
/api/wa-templates/sync

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.

Sync templates from Meta › query Parameters

integration_account_id
​string · uuid

Use specific WABA account. Falls back to META_WABA_ID env var.

Sync templates from Meta › Responses

Sync result

message
​string
total_from_meta
​integer
synced
​integer
errors
​integer

Get a WhatsApp template by ID

GET
https://api-chat.misindo.id
/api/wa-templates/{id}

Get a WhatsApp template by ID › path Parameters

id
​string · uuid · required

Get a WhatsApp template by ID › Responses

Template details

id
​string · uuid · required
waba_id
​string · required

WhatsApp Business Account ID

name
​string · required
language
​string · required

BCP-47 language code (e.g. id, en_US)

category
​string · enum · required
Enum values:
MARKETING
UTILITY
AUTHENTICATION
status
​string · enum · required
Enum values:
APPROVED
PENDING
REJECTED
PAUSED
DISABLED
components
​required

Meta template components array (HEADER, BODY, FOOTER, BUTTONS)

created_at
​string · date-time · required
updated_at
​string · date-time · required
meta_template_id
​string

Template ID assigned by Meta

header_media_url
​string

Public MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)


Edit a template (status-aware; re-submits to Meta)

PUT
https://api-chat.misindo.id
/api/wa-templates/{id}

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. Introducing or changing the Flow bound by a BUTTONS component's FLOW button additionally requires wa_flows.manage (403), and the Flow must be PUBLISHED and available in the catalog for the template's own WABA (422). Re-submitting the same binding (for example editing body text) needs no extra permission.

Edit a template (status-aware; re-submits to Meta) › path Parameters

id
​string · uuid · required

Edit a template (status-aware; re-submits to Meta) › Request Body

​object[] · required
category
​string · enum
Enum values:
MARKETING
UTILITY
AUTHENTICATION
integration_account_id
​string · uuid

Edit a template (status-aware; re-submits to Meta) › Responses

Updated template, now PENDING re-review

id
​string · uuid · required
waba_id
​string · required

WhatsApp Business Account ID

name
​string · required
language
​string · required

BCP-47 language code (e.g. id, en_US)

category
​string · enum · required
Enum values:
MARKETING
UTILITY
AUTHENTICATION
status
​string · enum · required
Enum values:
APPROVED
PENDING
REJECTED
PAUSED
DISABLED
components
​required

Meta template components array (HEADER, BODY, FOOTER, BUTTONS)

created_at
​string · date-time · required
updated_at
​string · date-time · required
meta_template_id
​string

Template ID assigned by Meta

header_media_url
​string

Public MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)


Delete a WhatsApp template (Meta-first)

DELETE
https://api-chat.misindo.id
/api/wa-templates/{id}

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.

Delete a WhatsApp template (Meta-first) › path Parameters

id
​string · uuid · required

Delete a WhatsApp template (Meta-first) › query Parameters

integration_account_id
​string · uuid

WABA integration account whose credentials are used to delete on Meta.

Delete a WhatsApp template (Meta-first) › Responses

Template deleted

message
​string

Bulk-send an approved template to a list of contacts

POST
https://api-chat.misindo.id
/api/wa-templates/{id}/bulk-send

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). When the template carries a FLOW button the caller additionally needs wa_flows.send (403).

Bulk-send an approved template to a list of contacts › path Parameters

id
​string · uuid · required

Bulk-send an approved template to a list of contacts › Request Body

contact_ids
​string[] · maxItems: 500 · required
variables
​object

Positional template variables shared by all recipients (e.g. {"1": "value"})

integration_account_id
​string · uuid

WhatsApp 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

message
​string
template_id
​string · uuid
campaign_id
​string · uuid
sent
​integer
failed
​integer
skipped
​integer

Update template header media URL

PATCH
https://api-chat.misindo.id
/api/wa-templates/{id}/header-media

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).

Update template header media URL › path Parameters

id
​string · uuid · required

Update template header media URL › Request Body

header_media_url
​string · required

Publicly accessible URL for the header media

Update template header media URL › Responses

Header media URL updated

id
​string · uuid · required
waba_id
​string · required

WhatsApp Business Account ID

name
​string · required
language
​string · required

BCP-47 language code (e.g. id, en_US)

category
​string · enum · required
Enum values:
MARKETING
UTILITY
AUTHENTICATION
status
​string · enum · required
Enum values:
APPROVED
PENDING
REJECTED
PAUSED
DISABLED
components
​required

Meta template components array (HEADER, BODY, FOOTER, BUTTONS)

created_at
​string · date-time · required
updated_at
​string · date-time · required
meta_template_id
​string

Template ID assigned by Meta

header_media_url
​string

Public MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)