---
title: "List templates"
method: GET
path: "/api/templates"
tags: ["Templates"]
---

# List templates

`GET /api/templates`

## Request

- Base URL: `https://core-api.getaptly.com`
- URL: `https://core-api.getaptly.com/api/templates`
- Auth: one of:
  - API key in header `x-token`
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/getaptly/apis/aptly-api/docs/api/templates/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns communication templates for the company. All filter parameters are optional.

Accepts an API key (`x-token`), delegate token (`Authorization: DelegateToken <token>`),
or partner token (`Authorization: Bearer <token>` with `templates` permission).
When using a partner token, pass `companyId` as a query parameter.

## Query parameters

- `companyId` string
- `templateType` 'sms' | 'email' | 'form' | 'eSignature' | 'pdf' | 'blockDocument'
- `aptletUuid` string
- `archived` boolean

## Response `200`

Array of templates.

- object
  - `data` Template[]
    - `_id` string: Template ID.
    - `companyId` string: Company the template belongs to.
    - `name` string: Template display name.
    - `templateType` 'sms' | 'email' | 'form' | 'eSignature' | 'pdf' | 'blockDocument': Template category.
    - `archived` boolean
    - `createdAt` string, date-time
    - `createdBy` string: User ID of the creator.
    - `updatedAt` string, date-time

## Other responses

- `400`: Missing companyId.
- `401`: Invalid or missing credential.

---

[API](https://skmtc.dev/getaptly/apis/aptly-api.md) - [All operations](https://skmtc.dev/getaptly/apis/aptly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaptly/apis/aptly-api/revisions/75c367e0b8e5?raw)
