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

# List Templates

> Retrieve a paginated list of templates in your workspace.

## Query Parameters

<ParamField query="page" type="integer" default="1">
  Page number (starts at 1).
</ParamField>

<ParamField query="pageSize" type="integer" default="20">
  Number of templates per page (1-100).
</ParamField>

<ParamField query="category" type="string">
  Filter by category: `email` or `reply_macro`.
</ParamField>

## Response

<ResponseField name="data" type="array">
  Array of template objects.

  <Expandable title="Template object">
    <ResponseField name="id" type="string">Unique template identifier.</ResponseField>
    <ResponseField name="name" type="string">Template name.</ResponseField>
    <ResponseField name="subject" type="string">Email subject line.</ResponseField>
    <ResponseField name="body" type="string">Email body content. Supports variables like `{{firstName}}`.</ResponseField>
    <ResponseField name="category" type="string">Template category: `email` or `reply_macro`.</ResponseField>
    <ResponseField name="createdAt" type="string">ISO 8601 timestamp.</ResponseField>
    <ResponseField name="updatedAt" type="string">ISO 8601 timestamp.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.foxreach.io/api/v1/templates?category=email" \
    -H "X-API-Key: otr_your_key"
  ```

  ```python Python SDK theme={null}
  from foxreach import FoxReach

  client = FoxReach(api_key="otr_your_key")
  templates = client.templates.list()
  ```

  ```typescript TypeScript SDK theme={null}
  import { FoxReach } from "foxreach";

  const client = new FoxReach({ apiKey: "otr_your_key" });
  const templates = await client.templates.list();
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": [
      {
        "id": "ctm_abc123",
        "name": "Cold Intro - SaaS",
        "subject": "Quick question about {{company}}",
        "body": "Hi {{firstName}},\n\nI noticed that {{company}} is...",
        "category": "email",
        "createdAt": "2025-01-10T08:00:00",
        "updatedAt": "2025-01-10T08:00:00"
      }
    ],
    "meta": {
      "page": 1,
      "pageSize": 20,
      "total": 1,
      "totalPages": 1
    }
  }
  ```
</ResponseExample>

## Rate Limit

* **100 requests per minute, per API key.** Fixed 60-second window.
* Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (unix epoch seconds).
* A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns (`Retry-After`, exponential backoff, monitoring `X-RateLimit-Remaining`), see [Rate Limiting](/rate-limiting).
