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

# List templates

> Return a paginated list of WhatsApp templates in the workspace.

Returns a Laravel-paginated list of WhatsApp templates registered in your workspace, along with Meta approval status.

## Endpoint

```
GET /api/v1/{subdomain}/templates
```

Required ability: `templates.read`.

## Headers

| Header          | Value                        |
| --------------- | ---------------------------- |
| `Authorization` | `Bearer <your-64-hex-token>` |
| `Accept`        | `application/json`           |

## Path parameters

<ParamField path="subdomain" type="string" required={true}>
  Your workspace subdomain.
</ParamField>

## Query parameters

<ParamField query="page" type="integer" required={false}>
  1-indexed page number. Defaults to `1`.
</ParamField>

<ParamField query="per_page" type="integer" required={false}>
  Items per page. Defaults to `15`, maximum `100`.
</ParamField>

## Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://dash.xobito.com/api/v1/acme/templates" \
    -H "Authorization: Bearer <your_token>" \
    -H "Accept: application/json"
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch("https://dash.xobito.com/api/v1/acme/templates", {
    headers: {
      Authorization: "Bearer <your_token>",
      Accept: "application/json",
    },
  });
  const body = await res.json();
  ```

  ```python Python theme={null}
  import requests

  r = requests.get(
      "https://dash.xobito.com/api/v1/acme/templates",
      headers={
          "Authorization": "Bearer <your_token>",
          "Accept": "application/json",
      },
  )
  body = r.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://dash.xobito.com/api/v1/acme/templates');
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer <your_token>',
          'Accept: application/json',
      ],
  ]);
  $body = json_decode(curl_exec($ch), true);
  curl_close($ch);
  ```
</CodeGroup>

## Example response

```json 200 OK theme={null}
{
  "status": "success",
  "data": {
    "current_page": 1,
    "data": [
      {
        "id": 11,
        "tenant_id": 13,
        "template_id": "123456789012345",
        "template_name": "order_confirmation",
        "language": "en_US",
        "status": "APPROVED",
        "category": "UTILITY",
        "header_data_format": "TEXT",
        "header_data_text": "Your order is confirmed",
        "header_params_count": 0,
        "body_data": "Hi {{1}}, your order {{2}} is confirmed.",
        "body_params_count": 2,
        "footer_data": "Thanks for shopping with us",
        "footer_params_count": 0,
        "buttons_data": null,
        "header_file_url": null,
        "header_variable_value": null,
        "body_variable_value": null,
        "template_type": null,
        "cards_json": null,
        "created_at": "2026-03-20T10:00:00.000000Z",
        "updated_at": "2026-03-20T10:00:00.000000Z"
      }
    ],
    "per_page": 15,
    "total": 5,
    "last_page": 1,
    "from": 1,
    "to": 5,
    "path": "https://dash.xobito.com/api/v1/acme/templates"
  }
}
```

See [Data Types → WhatsApp Template](/developers/data-types#whatsapp-template) for every field.

<Warning>
  Only templates where `status` is `APPROVED` can be sent through [`POST /messages/template`](/api-reference/endpoints/send-template-message).
</Warning>

## Error responses

| Status | When                    | Body                                                                                      |
| ------ | ----------------------- | ----------------------------------------------------------------------------------------- |
| `401`  | Missing / invalid token | `{"status":"error","message":"Invalid API token"}`                                        |
| `403`  | Missing ability         | `{"status":"error","message":"Token does not have the required ability: templates.read"}` |
| `429`  | Rate limit              | `{"message":"Too many requests","retry_after":45}`                                        |
| `500`  | Server error            | `{"status":"error","message":"Failed to list templates"}`                                 |
