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

# List templates

`GET /templates`

Returns a list of templates in a paginated manner. Each object in the `collection` represents a Template.
This endpoint should always return a result even if there are zero templates in the collection.

## Query parameters

- `per_page` integer
- `ending_before` string
- `starting_after` string
- `scopes` object

## Response `200`

OK

- object
  - `per_page` integer — Number of objects that are present in the collection.
  - `total` integer — Total number of objects.
  - `links` object
    - `previous` string, nullable — Link to the previous set of results.
    - `next` string, nullable — Link to the next set of results.
  - `collection` BaseTemplate[]
    - `id` integer — The ID of the resource.
    - `created_at` string, date-time — The date and time when the resource was created.
    - `updated_at` string, date-time — The date and time when the resource was last updated.
    - `name` string — The name of the template.
    - `subject_part` string — The subject part.

## Other responses

- `401` — Unauthorized
- `default` — Unexpected error

## Changes

- **2021-11-30** `17c65a731b7b` — 1 warning
  - removed the optional property `allOf[subschema #2]/collection/items/allOf[subschema #2]/user_id` from the response with the `200` status
- **2021-05-25** `d329870777db` — 2 info
  - added the new optional `query` request parameter `scopes`
  - added the non-success response with the status `401`
- **2021-05-19** `2184ad6268c4` — 3 info
  - api operation id `getTemplates` was added
  - api tag `templates` added
  - added the media type `application/json` for the response with the status `200`
- **2021-05-18** `c686bd33a4a5` — 1 breaking, 1 warning, 3 info
  - removed the media type `application/json` for the response with the status `200`
  - deleted the `query` request parameter `scopes`
  - api operation id `getTemplates` removed and replaced with ``
  - api tag `templates` removed
  - …1 more

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

---

[API](https://skmtc.dev/mailbadger/apis/mailbadger-api.md) · [All operations](https://skmtc.dev/mailbadger/apis/mailbadger-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mailbadger/mailbadger-api/revisions/3a7ef49250a1/schema)
