> ## 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 Contract Templates

> Retrieve contract templates for the current workspace, optionally filtered by locale or template type.

## Method

`GET` `/v1/contract-templates`

## Query Parameters

<ParamField query="locale" type="string">Return translations for the specified locale (alias: `lang`).</ParamField>
<ParamField query="activeOnly" type="boolean">Filter to active templates only (defaults to `false`).</ParamField>
<ParamField query="type" type="string">Filter by template type (`customer`, `supplier`, or `partner`).</ParamField>
<ParamField query="limit" type="integer">Max items to return (1–100).</ParamField>
<ParamField query="offset" type="integer">Number of records to skip for pagination (defaults to `0`).</ParamField>

## Headers

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

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.voyantcloud.com/v1/contract-templates?locale=fr&activeOnly=true" \
    -H "Authorization: Bearer $VOYANT_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const res = await fetch("https://api.voyantcloud.com/v1/contract-templates?type=customer&limit=25", {
    headers: { Authorization: `Bearer ${process.env.VOYANT_API_KEY}` },
  })
  const { items, total } = await res.json()
  ```

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

  resp = requests.get(
    "https://api.voyantcloud.com/v1/contract-templates",
    params={"locale": "de", "activeOnly": True},
    headers={"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}"},
  )
  templates = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "items": [
      {
        "id": "ct_01J0BE7Z3S494F9D4T3E2QJ0XR",
        "workspaceId": "ws_01HZYPM2QF2R8X9SZQ0J9SYBCN",
        "name": "Customer Master Agreement",
        "type": "customer",
        "description": "Standard customer contract",
        "templateJson": {
          "sections": [
            {
              "type": "paragraph",
              "text": "This Agreement is made between {{seller.name}} and {{buyer.name}}."
            }
          ]
        },
        "active": true,
        "createdBy": "usr_01GZK9NY7HRT3PYZ7X6XZD87JM",
        "createdAt": "2025-01-10T11:08:44.000Z",
        "updatedAt": "2025-03-05T16:32:18.000Z",
        "locale": "fr",
        "bodyHtml": "<p>Ce contrat lie {{seller.name}} à {{buyer.name}}.</p>",
        "variables": {
          "seller.name": "Seller legal entity",
          "buyer.name": "Buyer legal entity"
        }
      }
    ],
    "total": 1
  }
  ```
</ResponseExample>

<Tip>
  When `locale` (or `lang`) is provided, the API merges the matching translation onto each template, adding `locale`, `bodyHtml`, and `variables` fields.
</Tip>
