Skip to content

List WhatsApp templates ​

Returns the WhatsApp message templates of a connected Meta WhatsApp Cloud channel, fetched directly from Meta.

Pass for_text_message=1 when you only want templates that can be sent with Send a message (APPROVED, exact one text variable, and no media or location header).

GET/api/user/channels/{channel}/whatsapp-templates
Required scope: messages:send
Path parameters
integer
Query parameters
boolean
string
string
string
string
integer
string
string
curl -X GET "https://loopx-console.test/api/user/channels/512/whatsapp-templates?for_text_message=1&limit=20" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json"
<?php

use GuzzleHttp\Client;

$client = new Client();
$response = $client->request('GET', 'https://loopx-console.test/api/user/channels/512/whatsapp-templates?for_text_message=1&limit=20', [
    'headers' => [
        'Authorization' => 'Bearer $TOKEN',
        'Accept'        => 'application/json',
    ]
]);

$data = json_decode($response->getBody(), true);
const res = await fetch('https://loopx-console.test/api/user/channels/512/whatsapp-templates?for_text_message=1&limit=20', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer $TOKEN',
    Accept: 'application/json'
  }
});

const data = await res.json();

Example response

{
  "status": true,
  "code": 200,
  "validation": [],
  "message": "WhatsApp templates retrieved successfully",
  "data": {
    "templates": [
      {
        "id": "99918273645",
        "name": "order_update",
        "language": "en",
        "category": "UTILITY",
        "previous_category": null,
        "status": "APPROVED",
        "status_label": "Approved",
        "rejected_reason": null,
        "quality_score": "GREEN",
        "parameter_format": "POSITIONAL",
        "header": null,
        "body": {
          "text": "Hello, your order {{1}} is ready.",
          "examples": [
            "#1042"
          ]
        },
        "footer": "Reply STOP to unsubscribe",
        "buttons": [],
        "components": [
          {
            "type": "BODY",
            "text": "Hello, your order {{1}} is ready.",
            "example": {
              "body_text": [
                [
                  "#1042"
                ]
              ]
            }
          },
          {
            "type": "FOOTER",
            "text": "Reply STOP to unsubscribe"
          }
        ]
      }
    ],
    "paging": {
      "before": "MAZDZD",
      "after": "MjQZD",
      "has_previous": false,
      "has_next": false
    }
  }
}

Scope

This endpoint accepts tokens with either messages:send or pipelines:read. Find the channel id from List pipelines (channels[].id where provider = "whatsapp" and connector = "meta") or from a conversation message's channel_id.

Path parameters ​

NameTypeRequiredDescription
channelintegeryesMeta WhatsApp Cloud channel id — must belong to your workspace

Query parameters ​

NameTypeDescription
for_text_messageboolean (1 / 0 / true / false)When 1 (true), returns only templates valid for Send a message: status = APPROVED, exact one text variable, and no media or location header (header.format is TEXT or null). Overrides status to APPROVED.
statusstring | string[]Filter by template status (APPROVED, PENDING, REJECTED, PAUSED, DISABLED, IN_APPEAL, PENDING_DELETION). Accepts a single value, a comma-separated string, or an array.
categorystringFilter by category: UTILITY, MARKETING, or AUTHENTICATION.
languagestringFilter by template language code (e.g. en, en_US, ar).
searchstringFilter by template name substring (max 512 chars).
limitintegerNumber of templates to request from Meta per page (1–100, default 20).
afterstringCursor from data.paging.after to fetch the next page.
beforestringCursor from data.paging.before to fetch the previous page.

Response fields ​

Each item in data.templates contains everything required to preview or send the template:

FieldTypeDescription
idstringMeta template id — pass as template.id to Send a message
namestringTemplate name on Meta — pass as template.name
languagestringTemplate language code (e.g. en, en_US, ar) — pass as template.language
categorystringUTILITY, MARKETING, or AUTHENTICATION
statusstringAPPROVED, PENDING, REJECTED, PAUSED, DISABLED, …
status_labelstringHuman-readable status label
rejected_reasonstring | nullMeta rejection reason when status = REJECTED, otherwise null
quality_scorestring | nullGREEN, YELLOW, RED, or UNKNOWN
parameter_formatstring | nullPOSITIONAL (e.g. {{1}}) or NAMED (e.g. {{order_id}})
headerobject | nullNormalized header (format, text, example, media_example) or null
bodyobjectNormalized body with text (string) and examples (string[])
footerstring | nullFooter text, if any
buttonsobject[]Normalized buttons (type, text, url, url_example, phone_number)
componentsobject[]Raw Meta template components array

Pagination (data.paging) ​

FieldTypeDescription
beforestring | nullCursor to pass as before for the previous page
afterstring | nullCursor to pass as after for the next page
has_previousbooleantrue when a previous page exists
has_nextbooleantrue when a next page exists

Errors ​

CodeWhen
403Token is missing both messages:send and pipelines:read scopes, or the channel belongs to a different workspace
404Channel not found
422Invalid query parameter (status, category, language, for_text_message, or limit), or the channel is not a connected Meta WhatsApp Cloud channel
502Meta's Graph API could not be reached or rejected the WABA credentials