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

# List templates

`GET /v1/templates`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/templates`
- Auth: API key in header `x-api-key`

Returns template summaries, newest first, filterable by category, channel, status, project, and search. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a template's compiled content, current publication, and input schema with `GET /v1/templates/{id}`.

## Query parameters

- `limit` string, nullable
- `cursor` string
- `category` 'transactional' | 'marketing' | 'support' | 'notification' | 'verification' | 'reminder' | 'alert', nullable
- `channel` 'email', nullable
- `status` 'draft' | 'pending' | 'approved' | 'published' | 'rejected' | 'archived', nullable
- `search` string, nullable
- `projectId` string
- `namespaceId` string
- `shared` 'true' | 'false', nullable: Only templates whose project is shared with every namespace (true), or only unshared ones (false).

## Response `200`

TemplatePage

- TemplatePage
  - `items` TemplateSummary[], required
    - `id` string, required
    - `slug` string, required
    - `name` string, required
    - `channel` 'email', required
    - `projectId` string, required
    - `namespaceId` string, required
    - `shared` boolean, required: Whether the template's project is shared with every namespace. Every entry in a project shares it. A namespace-scoped key reads and sends a shared template in its own namespace but cannot change it. Only an organization-level project is shared.
    - `entryPath` string, required
    - `status` 'draft' | 'pending' | 'approved' | 'published' | 'rejected' | 'archived', required
    - `isActive` boolean, required
    - `publishedAt` string, nullable, required
    - `brand` TemplatePublicationBrand, required
      - `slug` string, required: The brand the publication imports.
      - `digest` string, required: The brand's digest when the publication was built.
      - `stale` boolean, required: Whether the brand has changed since this publication was built. Publishing the same commit again picks up the change.
    - `fromDefault` TemplateFromDefault, required
      - `email` string, required
      - `name` string, nullable
    - `usageCount` integer, required
    - `lastUsedAt` string, nullable, required
    - `createdAt` string, required
    - `updatedAt` string, required
  - `nextCursor` string, nullable, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

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