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

# List templates

> List the templates in your account — the importable objects, with their columns and validation rules — so your customers can pick what to import.

```http theme={null}
GET https://app.vern.so/api/v1/templates
GET https://app.vern.so/api/v1/templates/{template_slug}
```

Returns the **templates** in your account — the importable objects (Contacts,
Companies, and so on), each with its columns and validation rules. Use the list
to show your customer what they can import and let them choose, then pass the
chosen **slugs** as `templates` when you
[create a migration](https://docs.vern.so/migration-api/create-a-migration.md).

Templates are scoped to your **account**, not to a single source — the same
object set is available to every source. List sources and templates separately
and let your customer pick each.

## Authentication

Requires an `x-api-key` header. See [Authentication](https://docs.vern.so/migration-api/authentication.md).

## List all templates

```http theme={null}
GET https://app.vern.so/api/v1/templates
```

`200 OK`. Each template carries its `columns`, so you can render a preview of
exactly what each object holds.

```json theme={null}
{
  "templates": [
    {
      "slug": "contacts",
      "name": "Contacts",
      "description": "People at the customer's accounts.",
      "columns": [
        {
          "name": "Email",
          "description": "Primary email address.",
          "required": true,
          "unique": true,
          "desiredRule": "strict",
          "strictRule": "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"
        },
        {
          "name": "Account",
          "description": "The company this contact belongs to.",
          "required": true,
          "unique": false,
          "desiredRule": "link",
          "linkRule": [{ "templateId": "…", "columnName": "Name" }]
        }
      ]
    }
  ]
}
```

## Fetch one template

```http theme={null}
GET https://app.vern.so/api/v1/templates/{template_slug}
```

Returns a single active template by its slug. `404` if no active template has
that slug.

```json theme={null}
{
  "slug": "contacts",
  "name": "Contacts",
  "description": "People at the customer's accounts.",
  "columns": [ /* … */ ]
}
```

## Fields

**slug** `string`

The template's stable public identifier — a snake\_case form of its name (e.g.
`contacts`). Pass it in `templates` when you
[create a migration](https://docs.vern.so/migration-api/create-a-migration.md), and use it to address
the sheet on [export](https://docs.vern.so/migration-api/export-csv.md).

**name** `string`

The template's display name — the object (e.g. "Contacts"). Becomes the sheet
name on the migration's workbook.

**description** `string | null`

An optional human description of the object.

**columns** `object[]`

The object's fields and validation rules, in order. What each setting enforces
is documented in [Column options](https://docs.vern.so/help-center/templates/columns.md). Each column
has:

**column**

**name** `string`

The column's display name, and the key it is addressed by everywhere else.
Columns are matched by name, so renaming one is a delete plus an add.

**description** `string`

What the column holds. This is the main thing the import agent reads when
deciding which source field maps here.

**required** `boolean`

Flags a cell as invalid when it is missing, null, empty, or whitespace
only.

**unique** `boolean`

Flags repeated values within **one sheet**. Compared case-insensitively and
trimmed; blank cells are skipped.

**desiredRule** `string`

What the column is *for*: `none`, `strict`, `link`, or the legacy `ai`.
It is a label, not a gate — every rule a column carries is enforced
whichever value this holds. `link` additionally switches on the grid's live
link re-check, and tells [Writers](https://docs.vern.so/help-center/send/write-to-an-api.md) how records
relate, so linked records are sent in order and connected to each other.

**strictRule** `string`

A POSIX regular expression every non-blank value must match. Not anchored
for you — use `^…$` when you mean the whole value. Returned whenever the
column carries one, independently of `desiredRule`.

**schema** `object`

A per-column JSON Schema declaring the value's shape — a list, a record, a
list of records. Takes precedence over `strictRule` when both are present.
See [Structured values](https://docs.vern.so/help-center/templates/structured-values.md).

**linkRule** `object[]`

Cross-template references. Each entry carries `templateId` (a string, or an
array for polymorphic targets) and `columnName`, optionally plus
`discriminator` / `valueMap` for a target chosen per row, and
`valuePath` / `keyPath` / `keyMap` for a reference that lives inside a
structured value. Returned whenever the column carries one, independently
of `desiredRule`. See [Link columns](https://docs.vern.so/help-center/templates/link-columns.md).

## Errors

| Status | Meaning |
| - | - |
| `401` | API key missing or invalid. |
| `404` | (single fetch) No active template with that slug. |
| `429` | **30 requests per minute** per account (the Reads class). Check `Retry-After`. See [Rate limits](https://docs.vern.so/migration-api/errors.md#rate-limits). |
| `500` | Server error. |

## Example

```bash theme={null}
curl https://app.vern.so/api/v1/templates \
  -H "x-api-key: $VERN_API_KEY"

curl https://app.vern.so/api/v1/templates/contacts \
  -H "x-api-key: $VERN_API_KEY"
```

## Next

* [List sources](https://docs.vern.so/migration-api/list-sources.md) — the systems you migrate from.
* [Create a migration](https://docs.vern.so/migration-api/create-a-migration.md) — create a migration with the chosen templates.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.