---
docId: doc_1329862b4a9d47e5aabce071e75feeb9
title: List templates
description: "List workspace templates and filter by status, category, or language."
api:
  group: mensajes/plantillas
  auth: bearer
  operations:
    - operationId: listWhatsAppTemplates
      method: GET
      path: /v1/whatsapp/templates
      postmanName: List Templates
---

<script>
  import { Ways, Note } from '$lib/components';
</script>

# List templates

List workspace templates and filter by status or category. Check `warnings` to see whether each WhatsApp account could be read.

You need an approved template to start a conversation outside the 24-hour window.

<Note type="important">

You can [create](/api-reference/whatsapp-templates/create), [update](/api-reference/whatsapp-templates/update) and [delete](/api-reference/whatsapp-templates/delete) templates with the API. Meta reviews each new or edited template before it can be sent.

</Note>

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl "https://api.platic.ai/v1/whatsapp/templates?status=APPROVED&category=UTILITY" \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
const { templates, warnings } = await platic.whatsapp.templates.list();
```

`templates` is the complete list; `warnings` identifies accounts that could not be read.

</Ways.Way>
</Ways>

## Query parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `workspace` | string | Workspace ID. Required if your credential covers several workspaces ([list workspaces](/api-reference/workspaces)); without it the answer is `400` | If the credential has several |
| `status` | string | Only templates in these statuses, comma-separated: `APPROVED` or `APPROVED,PAUSED` | — |
| `category` | string | Only these categories, comma-separated: `MARKETING`, `UTILITY` or `AUTHENTICATION` | — |
| `name` | string | Only templates whose name contains this text, case-insensitive. For an exact name use [get a template](/api-reference/whatsapp-templates/get) | — |

For example, `?status=APPROVED&category=UTILITY` returns only the utility templates that can already be sent.

## Response

`data` is the list of workspace templates. Each language version is a separate entry: `order_update` in `es_MX` and in `en_US` appears twice.

```json
{
  "status": "success",
  "data": [
    {
      "id": "1234567890123456",
      "name": "order_update",
      "category": "UTILITY",
      "status": "APPROVED",
      "language": "es_MX",
      "source": "meta",
      "content": "Hi {{1}}, your order {{2}} is ready for pickup.",
      "params": ["Ana", "A-1024"],
      "header": { "type": "none", "requiresMedia": false },
      "footer": "Acme",
      "buttons": [],
      "api_example": {
        "name": "order_update",
        "params": ["Ana", "A-1024"]
      },
      "dynamicButtonsCount": 0
    }
  ],
  "warnings": [
    {
      "code": "WHATSAPP_TOKEN_INVALID",
      "message": "WhatsApp rejected the access token of this WhatsApp Business Account: it expired or was revoked. Reconnect the account in Platica and try again.",
      "wabaId": "155598765432109",
      "status": 409
    }
  ]
}
```

| Field | Description |
|-------|-------------|
| `data` | The templates that pass the filters, in the shape of [get a template](/api-reference/whatsapp-templates/get). Each carries `api_example` (the body to send it) and `dynamicButtonsCount` |
| `warnings` | Only if something is missing from the list. Each warning carries `code` and `message` |

There are two kinds of warning:

- `WABA_NOT_FOUND`: the workspace has no WhatsApp Business account (WABA) connected. `data` comes back empty.
- A WABA whose templates could not be read, with `wabaId` and `status`. Its templates are missing from `data`; those of the other WABAs are there. `code` is the same one a write on that WABA would answer: `WHATSAPP_TOKEN_INVALID` or `WHATSAPP_PERMISSION_DENIED` (reconnect the account in Platica), `WHATSAPP_ACCOUNT_RESTRICTED` (Meta restricted the account), `RATE_LIMITED` (wait a few minutes) or `UPSTREAM_ERROR` (try again in a moment).

<Note type="warning">

`warnings` identifies WABAs that could not be read. If none could be read, the response is an error.

</Note>

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | A filter is not valid, such as a `category` that does not exist (`details.issues` says which). Also if your credential covers several workspaces and you did not send `?workspace=`, or you sent one it does not cover: `details.available` has the IDs you can use |
| `401` | `UNAUTHENTICATED` | The credential is missing or not valid |
| `403` | `FORBIDDEN` | The person has no permission in Conversations or Campaigns. The message is `Missing conversations or campaigns permission` |
| `404` | `WORKSPACE_NOT_FOUND` | The workspace no longer exists |
| `409` | `WHATSAPP_TOKEN_INVALID`, `WHATSAPP_PERMISSION_DENIED`, `WHATSAPP_ACCOUNT_RESTRICTED` | No WABA of the workspace could be read through its WhatsApp account. The status and code are those of the first failure; `details.wabaId` says which and `details.wabaErrors` lists all of them |
| `429` | `RATE_LIMITED` | Same, because WhatsApp is rate limiting requests |
| `502` | `UPSTREAM_ERROR` | Same, because Platica could not reach WhatsApp. Also if the workspace uses MessageBird (legacy) and its templates could not be read |
| `503` | `TEMPORARILY_UNAVAILABLE` | Platica could not read the workspace or its WABAs. Try again in a moment |

```json
{
  "code": 409,
  "error": "Conflict - The resource state conflicts with this request",
  "details": {
    "code": "WHATSAPP_TOKEN_INVALID",
    "message": "WhatsApp rejected the access token of this WhatsApp Business Account: it expired or was revoked. Reconnect the account in Platica and try again.",
    "wabaId": "155598765432109",
    "wabaErrors": [
      {
        "wabaId": "155598765432109",
        "code": "WHATSAPP_TOKEN_INVALID",
        "message": "WhatsApp rejected the access token of this WhatsApp Business Account: it expired or was revoked. Reconnect the account in Platica and try again.",
        "status": 409
      }
    ]
  }
}
```

The general error format is in [Errors](/api-reference/errors).
