> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sagepilot.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List WhatsApp templates

> List the WhatsApp templates in your workspace with their content and saved retry settings.

```json 200 theme={null}
{
  "templates": [
    {
      "id": "22222222-2222-4222-8222-222222222222",
      "channel_id": "5f3c1e9a-8b2d-4c1e-9f6a-0d1b2c3d4e5f",
      "name": "order_update",
      "language": "en",
      "category": "UTILITY",
      "status": "APPROVED",
      "type": "TEMPLATE",
      "components": [
        { "type": "BODY", "text": "Hi {{1}}, your order {{2}} is on its way." },
        { "type": "BUTTONS", "buttons": [{ "type": "URL", "text": "Track order", "url": "https://example.com/track/{{1}}" }] }
      ],
      "parameters": {
        "body_parameters": [
          { "type": "variable", "variable": "sagepilot.customer.name" },
          { "type": "variable", "variable": "shopify.order.name" }
        ],
        "button_parameters": [
          { "type": "variable", "variable": "shopify.order.tracking_url" }
        ]
      },
      "wa_retry_config": {
        "retry_timeout_hours": 12,
        "retry_window_enabled": true,
        "retry_window_start_hour": 21,
        "retry_window_end_hour": 7,
        "retry_window_timezone": "Asia/Kolkata"
      }
    },
    {
      "id": "33333333-3333-4333-8333-333333333333",
      "channel_id": "5f3c1e9a-8b2d-4c1e-9f6a-0d1b2c3d4e5f",
      "name": "welcome",
      "language": "en",
      "category": "MARKETING",
      "status": "APPROVED",
      "type": "TEMPLATE",
      "components": [{ "type": "BODY", "text": "Welcome to our store!" }],
      "parameters": {},
      "wa_retry_config": null
    }
  ],
  "total": 2,
  "total_pages": 1
}
```

List the WhatsApp templates in the authenticated workspace. Each template is returned as its renderable definition: the Meta-style `components`, the Sagepilot variable `parameters` mapped onto those components, and the template-level `wa_retry_config` (`null` when none has been saved).

Use [Get WhatsApp template](https://docs.sagepilot.ai/api-reference/templates/get-whatsapp-template.md) to read a single template by ID.

## Required access

| Authentication | Scope | Dataset grant |
| - | - | - |
| [API client v2](https://docs.sagepilot.ai/api-reference/authentication/api-client-v2.md) | `templates:read` | - |

## Query parameters

**page** `integer` (default: 1)

Page number, starting at `1`.

**page\_size** `integer` (default: 12)

Templates per page. Maximum value is `200`.

**status** `string` (default: all)

Filter by template status, matched case-insensitively against the stored status, for example `approved`, `pending`, `rejected`, or `draft`. `all` returns every template that is not deleted.

**search** `string`

Case-insensitive substring match on the template name.

**category** `string`

Filter by Meta category: `MARKETING`, `UTILITY`, or `AUTHENTICATION`.

**channel\_id** `string`

Return only templates that belong to one WhatsApp channel. Use the `channel_id` values returned by this endpoint.

**include\_content** `boolean` (default: true)

Set to `false` for a lightweight listing without `components`. Lightweight items use a metadata shape rather than the full definition.

## Response

**templates** `object[]` *required*

One template definition per result, ordered newest first.

**templates\[].id** `string`

Template UUID. Pass it as `template_id` to [Get WhatsApp template](https://docs.sagepilot.ai/api-reference/templates/get-whatsapp-template.md).

**templates\[].channel\_id** `string`

WhatsApp channel the template belongs to, when present.

**templates\[].name** `string`

Template name as registered with Meta. Case-sensitive.

**templates\[].language** `string`

Meta language code, for example `en` or `en_US`.

**templates\[].category** `string`

Meta category: `MARKETING`, `UTILITY`, or `AUTHENTICATION`.

**templates\[].status** `string`

Meta review status, for example `APPROVED`, `PENDING`, `REJECTED`, or `DRAFT`.

**templates\[].type** `string`

`TEMPLATE` or `CAROUSEL`.

**templates\[].components** `object[]`

Meta-style components with `{{n}}` placeholders. Omitted when `include_content=false`.

**templates\[].parameters** `object`

Sagepilot variable and fixed-value mappings for each placeholder.

**templates\[].wa\_retry\_config** `object`

Template retry settings, or `null` when the platform default applies. Same shape as in [Get WhatsApp template](https://docs.sagepilot.ai/api-reference/templates/get-whatsapp-template.md).

**total** `integer`

Total number of templates that match the filters across all pages.

**total\_pages** `integer`

Number of pages at the requested `page_size`.

## Errors

| Status | Meaning |
| - | - |
| `401` | Missing or invalid API client token. |
| `403` | The API client lacks the `templates:read` scope. |
| `422` | A query parameter is out of range, for example `page_size` above `200`. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.