---
title: "List all templates."
method: GET
path: "/templates"
tags: ["Template"]
---

# List all templates.

`GET /templates`

## Request

- Base URL: `https://api.carbone.io`
- URL: `https://api.carbone.io/templates`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/carbone/apis/carbone-api/docs/templates/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves a list of templates from the Carbone storage; with comprehensive filtering, searching, and pagination capabilities. By default, the endpoint returns all deployed templates, sorted by creation date in descending order, excluding any that have expired. It supports filtering by various criteria such as template ID, version ID, and category, offering flexibility to retrieve specific subsets of templates. Additionally, it supports fuzzy search in template names and exact matches on IDs and version IDs, enhancing discoverability.

### Features
- Filtering: Filter templates by ID, version ID, and category to narrow down results based on specific criteria.
- Search Support: Utilize fuzzy search for template names and exact matches for IDs and version IDs to quickly locate desired templates.
- Version Inclusion: Include all versions of a template in the results by setting the `includeVersions` parameter to true, allowing for comprehensive version tracking.
- Pagination: Employ cursor-based pagination to efficiently navigate through large datasets, enabling scalable data retrieval.

## Query parameters

- `id` string
- `versionId` string
- `category` string
- `origin` number
- `includeVersions` boolean
- `search` string
- `limit` integer
- `cursor` string

## Headers

- `carbone-version` '5' | '4' | '3' | 'staging', required

## Response `200`

List of deployed templates and their versions.

- object
  - `success` boolean
  - `data` object[]
    - `id` string: A constant identifier for a template (format: 64-bit), and used to generate documents:
    - `versionId` string: A unique identifier for a specific version of a template (format: SHA-256 hash).
    - `deployedAt` integer: When generating a document with a [Template ID](https://carbone.io/documentation/developer/http-api/introduction.html#template-id), Carbone uses the most recent deployedAt version. The deployedAt value must be a UTC Unix timestamp; values ≥ 42000000000 (year 3300) are interpreted as 'NOW'. Future values are not allowed.
    - `createdAt` integer: UTC Unix timestamp.
    - `expireAt` integer: UTC Unix timestamp at which the template stops being returned by the API, before being removed once the server's retention delay has passed. `0` means the template never expires.
    - `size` integer: File size in bytes.
    - `type` string: File type (e.g. 'docx', 'xlsx', 'pptx', and more...)
    - `name` string: Template Name.
    - `category` string: Category of the template.
    - `comment` string: Template Comments.
    - `tags` string[]: Template Tags.
    - `origin` number: Upload origin of templates: - `0`: Templates uploaded via the API. - `1`: Templates uploaded via the Studio. - `2`: Templates uploaded via the Salesforce integration. - `3`: Templates uploaded via the Odoo integration. - `4`: Templates uploaded via the HubSpot integration.
  - `hasMore` boolean: Indicates whether additional templates are available beyond the current set. If `false`, the current response contains the last page of results.
  - `nextCursor` string: If `hasMore` is `true`, this value specifies the cursor to use in the next request (via the `cursor` query parameter) to fetch the subsequent page of templates.

## Other responses

- `400`: A query parameter was rejected, or the template database could not be read. The message after `Invalid search filters.` names the offending parameter and the expected range or format, or says `Database error`.
- `401`: Unauthorized, please provide a correct API key on the `Authorization` header. The API key is available on your Carbone account: https://account.carbone.io.
- `500`: Server or Database Error.
- `501`: Carbone On-Premise only: this endpoint needs the template database, and the server runs in stateless mode (no database).

## Changes

- **2026-11-06** `c06cc573e3b0`: 3 breaking, 4 warning, 6 info
  - the `carbone-version` request header's property undefined was restricted to a list of enum values
  - the `header` request parameter `carbone-version` was restricted to a list of enum values
  - for the `query` request parameter `limit`, default value `100` was added
  - for the `query` request parameter `category`, the maxLength was set to `200`
  - …9 more

[Operation history](https://skmtc.dev/carbone/apis/carbone-api/changes/templates/get.md)

---

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