# List approved WhatsApp templates

`GET https://api.chat-data.com/api/v2/whatsapp-templates`

Canonical: https://www.chat-data.com/api-reference/list-whatsapp-templates

## Authentication

Send an API key as a Bearer token: `Authorization: Bearer $CHAT_DATA_API_KEY`. Workspace keys reach every chatbot in the workspace; chatbot-scoped keys reach only their chatbot. Keep keys on the server.

## Description

Lists every approved template of every WhatsApp Business Account behind the chatbot's connected official WhatsApp numbers, with the values each one needs.

`variables` groups the slots to fill by component: `header`, `body`, and `buttons[<index>]` for dynamic URL and copy-code buttons. Positional templates use keys `1`, `2`, ...; named templates use the parameter names. Pass the same structure as `template.variables` when sending.

Authentication templates (`apiOnly: true`) take a one-time code in `otp` instead of variables. Templates with `supported: false` (carousel, limited-time-offer, catalog or location headers) cannot be sent yet.

One account that cannot be read does not fail the request: `complete` is false and its id is in `unavailableAccountIds`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| chatbotId | query | string | yes |  |

## Example request

```bash
curl 'https://api.chat-data.com/api/v2/whatsapp-templates?chatbotId=6650f1c2a9e4b83d2c7a1f05' \
  -H "Authorization: Bearer $CHAT_DATA_API_KEY"
```

## Example response (200)

```json
{
  "templates": [
    {
      "id": "6650f1c2a9e4b83d2c7a1f3c",
      "name": "order_update",
      "language": "en_US",
      "category": "MARKETING",
      "qualityScore": "GREEN",
      "parameterFormat": "POSITIONAL",
      "wabaId": "6650f1c2a9e4b83d2c7a1f3c",
      "components": [
        {}
      ],
      "variables": {
        "header": [
          "1"
        ],
        "body": [
          "1",
          "2"
        ],
        "buttons[1]": [
          "1"
        ]
      },
      "headerFormat": "TEXT",
      "hasFlow": true,
      "apiOnly": true,
      "supported": true,
      "unsupportedReason": "Carousel and limited-time-offer templates are not supported yet."
    }
  ],
  "senders": [
    {
      "phoneNumberId": "6650f1c2a9e4b83d2c7a1f3c",
      "phone": "14155550100",
      "displayPhoneNumber": "+1 415-555-0100",
      "wabaId": "6650f1c2a9e4b83d2c7a1f3c",
      "verifiedName": "Jane Doe",
      "isOnBizApp": true
    }
  ],
  "complete": true,
  "unavailableAccountIds": [
    "6650f1c2a9e4b83d2c7a1f3c"
  ]
}
```

## Responses

| Status | Description |
| --- | --- |
| 200 | The approved templates and the numbers that can send them. |
| 400 | `chatbotId` is missing, or the official WhatsApp integration is not connected (`code` WHATSAPP_NOT_CONNECTED). |
| 401 | Authentication failed: the `Authorization` header is missing or invalid, or the workspace's plan does not include API access. |
| 403 | The API key cannot access the requested chatbot. A chatbot-scoped key used with another chatbot's ID gets `Access denied to this chatbot`. A workspace key, or a chatbot-scoped key used with its own chatbot's ID, gets `Chatbot <id> was not found in this API key's workspace. It may have been deleted or moved to another workspace.` when the chatbot does not exist or belongs to another workspace. |
| 429 | The workspace sent more than 600 API requests in the last minute. |
