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

# List Templates

`GET /templates`

## Request

- Base URL: `https://app.lettr.com/api`
- URL: `https://app.lettr.com/api/templates`
- Auth: HTTP bearer

Retrieve a paginated list of email templates for a project. If `project_id` is not provided, templates from the team's default project will be returned.

## Query parameters

- `project_id` integer
- `folder_id` integer
- `purpose` 'transactional' | 'campaign'
- `per_page` integer
- `page` integer

## Response `200`

List of templates retrieved successfully

- ListTemplatesResponse: Response containing a paginated list of templates
  - `message` string, required: Human-readable response message
  - `data` object, required
    - `templates` TemplateView[], required: List of templates
      - `id` integer, required: Unique identifier for the template
      - `name` string, required: Name of the template
      - `slug` string, required: URL-friendly identifier for the template
      - `project_id` integer, required: ID of the project containing this template
      - `folder_id` integer, required: ID of the folder containing this template
      - `purpose` 'transactional' | 'campaign', required: Module the template belongs to. `transactional` templates are the ones you send single emails with; `campaign` templates are the ones the campaign builder can pick.
      - `preparation_status` 'pending' | 'ready' | 'failed', required: How far the template has got through preparation. Creating or updating a template through the API defers image migration and HTML rendering to a background job, so the template is `pending` until that finishes. On a create with JSON there is no HTML at all yet - the editor works (it reads the JSON) but sending and the screenshot do not. On an update the previous render stays in place, so the template remains sendable, but it is still serving the *old* content until this reads `ready`. `failed` means preparation exhausted its retries and will not become ready on its own. A template created from raw HTML is `ready` immediately.
      - `created_at` string, date-time, required: When the template was created
      - `updated_at` string, date-time, required: When the template was last updated
    - `pagination` TemplatesPagination, required: Pagination information for templates list
      - `total` integer, required: Total number of templates
      - `per_page` integer, required: Number of templates per page
      - `current_page` integer, required: Current page number
      - `last_page` integer, required: Last page number

## Other responses

- `401`: Unauthorized - Missing or invalid API key
- `404`: Project not found or no default project configured
- `422`: Validation error
- `500`: Server error
- `503`: Service unavailable - the API key could not be verified, so the request was not processed. This does not mean the key is invalid; retry after the delay given in the Retry-After header.

---

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