# List data collection templates (/docs/api/voice-agents/data-collection/listDataCollectionTemplates)

> For the complete documentation index, see [llms.txt](https://docs.tandemcx.ai/llms.txt). Any page on this site can be fetched as Markdown by appending `.md` to its URL.

`GET /v1/agent-media/data-collection/templates`

List data collection templates

Starting points for an agent's fields, such as contact details or an appointment request. A template is copied into the agent's config when you pick it, so a later change to a template never alters an agent you already set up.

## Request

**Base URL:** `https://api.tandemcx.ai`

**Authentication:** `Authorization: Bearer <token>` — A Tandem bearer token. Requests are scoped to the organization the token belongs to; no organization header is required.

No parameters or request body.

## Responses

### 200 — The available templates.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `templates` | array of object | No | — |
| `templates[].id` | string | Yes | — |
| `templates[].name` | string | Yes | — |
| `templates[].description` | string | Yes | — |
| `templates[].fields` | array of object | Yes | — |
| `templates[].fields[].key` | string | Yes | The name the agent records the value under, which also labels the value on the call or chat record. Lowercase letters, digits, and underscores, starting with a letter, at most 40 characters. Unique within the agent's fields. |
| `templates[].fields[].label` | string | Yes | What the field is called, shown to the person and to you. |
| `templates[].fields[].kind` | enum: `full_name` \| `email` \| `phone` \| `postal_address` \| `postal_code` \| `date` \| `date_of_birth` \| `number` \| `yes_no` \| `alphanumeric_code` \| `free_text` | Yes | The type of value. Each kind validates and normalizes the answer, so an email is lowercased and a phone number is stored in E.164 format. |
| `templates[].fields[].required` | boolean | No | Tells the agent the field matters, so it aims to collect it. Not enforced: a caller or visitor can still skip it. |
| `templates[].fields[].prompt` | string | No | What to ask. Empty means the agent words the question from the label. |

### 401 — Missing, malformed, or expired bearer token.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | string | No | A stable machine-readable code. |
| `message` | string | No | A human-readable explanation, safe to show to an end user. Present on errors an operator can act on; browser clients display this field in preference to a generic fallback. |
| `limit` | integer | No | Present on some errors (e.g. `prompt_too_long`) that reject a value against a fixed bound: the bound itself. |
| `length` | integer | No | Present on some errors (e.g. `prompt_too_long`) that reject a value against a fixed bound: the measured size of the rejected value. |
| `reason` | string | No | Present on some errors (e.g. `invalid_avatar_image`) that have more than one cause: which one applied. |
