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

# List Communication Templates

> Retrieve communication templates with optional filtering by channel, purpose, or status.

## Method

`GET` `/v1/comms/templates`

## Query Parameters

<ParamField query="channel" type="string">Filter by delivery channel (e.g., `email`, `sms`, `whatsapp`, `push_notification`).</ParamField>
<ParamField query="purpose" type="string">Filter by purpose (`transactional` or `marketing`).</ParamField>
<ParamField query="status" type="string">Filter by status (`draft`, `active`, `inactive`, `archived`).</ParamField>

## Headers

<ParamField header="Authorization" type="string">Bearer token (requires `comms:read`).</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.voyantcloud.com/v1/comms/templates?channel=email&status=active" \
    -H "Authorization: Bearer $VOYANT_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const res = await fetch("https://api.voyantcloud.com/v1/comms/templates?purpose=transactional", {
    headers: { Authorization: `Bearer ${process.env.VOYANT_API_KEY}` },
  })
  const { items } = await res.json()
  ```

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

  resp = requests.get(
    "https://api.voyantcloud.com/v1/comms/templates",
    params={"status": "draft"},
    headers={"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}"},
  )
  templates = resp.json()["items"]
  ```
</RequestExample>

## Response Fields

Each template item includes:

* `id` – Template ID (UUID).
* `workspace_id` – Workspace owning the template.
* `name` – Human-readable name.
* `key` – Unique key used when sending notifications.
* `channel` – Delivery channel.
* `purpose` – `transactional` or `marketing`.
* `status` – Lifecycle status (`draft`, `active`, `inactive`, `archived`).
* `created_at` / `updated_at` – ISO timestamps.

## Response Example

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "items": [
      {
        "id": "tmpl_01J0CBFPXW7SP2N8A9Q7T2048Q",
        "workspace_id": "ws_01HZYPM2QF2R8X9SZQ0J9SYBCN",
        "name": "Booking Confirmation",
        "key": "booking_confirmation",
        "channel": "email",
        "purpose": "transactional",
        "status": "active",
        "created_at": "2025-01-08T10:22:31.000Z",
        "updated_at": "2025-02-02T14:12:40.000Z"
      }
    ]
  }
  ```
</ResponseExample>

<Tip>
  Filters are applied server-side after fetching workspace templates. Provide multiple parameters to narrow the list (e.g., email + active transactional templates).
</Tip>
