Skip to content
View as Markdown
Enter your site to enable Send. Requests are sent from your browser, so the site must allow cross-origin calls (CORS).

GET WhatsApp Templates​

GET
/whatsapp/templates

List the template catalogue stored in fc_message_templates (newest first) together with review-status counts. Despite the whatsapp/ prefix the catalogue is shared by channels: channel defaults to whatsapp, and sms or all return the local SMS text templates as well. Rows of every provider are returned; each carries is_selectable / disabled_reason, and only templates of the currently configured provider are selectable.

Pagination is opt-in. The response is paginated (20 per page, max 100) only when any of channel, search, status, per_page or page is sent; otherwise templates is a plain array of every row. approved_only forces channel=whatsapp and restricts rows to APPROVED templates of the current provider.

A channel that is not active (or a call with no active channel at all) returns 422 The selected messaging channel is not enabled. Note that the default channel=whatsapp therefore fails on an SMS-only install.

PRO (FluentCampaign Pro). The route exists only while the Messaging module (the messaging_module experimental setting) is switched on, and the policy answers 403 unless at least one channel (SMS or WhatsApp) is active.

Required capability: fcrm_read_emails or fcrm_manage_email_templates — which one applies depends on the action being performed.

Enforced by MessagePolicy::index().

Requires: FluentCampaign Pro with the Messaging module enabled. While no messaging channel (SMS or WhatsApp) is switched on the route is not registered at all and returns a 404.

Authorizations​

ApplicationPasswords

WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password

Type
API Key (header: Authorization)

Parameters​

Query Parameters

channel

Template channel. Unknown values fall back to whatsapp.

Type
string
Valid values
"whatsapp""sms""all"
Default
"whatsapp"
status

Review status filter; upper-cased before matching, for example APPROVED, PENDING, REJECTED, PAUSED, DISABLED.

Type
string
approved_only

When truthy, return only APPROVED WhatsApp templates of the current provider.

Type
boolean
search

Substring match on name, category, status, provider or body text.

Type
string
per_page

Rows per page (capped at 100). Sending it turns pagination on.

Type
integer
Default
20
page

Page number. Sending it turns pagination on.

Type
integer
Default
1

Responses​

Templates and status counts.

application/json
JSON
{
"templates": [
{
"id": 0,
"channel": "string",
"provider": "string",
"name": "string",
"language": "string",
"category": "string",
"status": "string",
"header_text": "string",
"body_text": "string",
"footer_text": "string",
"buttons": [
{
}
],
"variables": {
},
"provider_template_id": "string",
"rejection_reason": "string",
"last_synced_at": "string",
"created_by": 0,
"created_at": "string",
"updated_at": "string",
"provider_label": "string",
"current_provider": "string",
"current_provider_label": "string",
"is_current_provider": true,
"is_selectable": true,
"disabled_reason": "string"
}
],
"supports_sync": true,
"current_provider": "string",
"current_provider_label": "string",
"provider_labels": {
"additionalProperties": "string"
},
"last_synced_at": "string",
"has_inactive_provider_templates": true,
"counts": {
"total": 0,
"approved": 0,
"pending": 0,
"rejected": 0
}
}

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI