# List templates

Fetch templates available for the authenticated workspace.
Use `filter[query]` to search templates by title with a partial, case-insensitive match.
Example: `GET /api/templates?filter[query]=employment`
Use `filter[collection]` to only return templates that belong to a specific collection ID.
Example: `GET /api/templates?filter[collection]=01965c7e-dc1e-7292-8199-8184041c1204`
You can combine both filters in one request.
Example: `GET /api/templates?filter[query]=employment&filter[collection]=01965c7e-dc1e-7292-8199-8184041c1204`
To include template collections in each template item, request `include=collections`.

Endpoint: GET /api/templates
Version: 1.0.0
Security: APIKey

## Security:

  - `APIKey` (unknown)
    http bearer API Key

## Query parameters:

  - `per_page` (integer)
    Number of items per page.

  - `page` (integer)
    Page number to retrieve. Defaults to 1.

  - `filter[query]` (string)
    Filter templates by a partial match against the localized title.

  - `filter[collection]` (string)
    Filter templates to those belonging to the specified template collection. Use `GET /api/template-collections` to discover available collection IDs. Please note that a template may belong to multiple collections.

  - `sort` (string)
    Sort order for the template list. Use the field name for ascending order, or prefix with `-` for descending order (for example, `title` sorts by localized title ascending; `-title` sorts descending).

Allowed sort fields: `title`, `created_at`, and `updated_at`.

Multiple sorts can be combined in one parameter as a comma-separated list (for example, `sort=title,-created_at`).

When sorting by `title`, set `sort_locale` to control which translation is preferred for the comparison. If `sort_locale` is omitted, the API compares titles using a fallback across all supported languages.

  - `sort_locale` (string)
    Locale code used when sorting by `title`: that language’s string is preferred when comparing titles (other languages are still used as fallback). Must be one of the supported Builder language codes. Ignored when the active sort does not use localized title.

  - `include` (string)
    Comma delimited list of optional relationships to include. <br>Available includes: `collections`, `jurisdictions`, `languages`.

## Header parameters:

  - `Accept` (string, required)
    Specify the response format.

## Response 200:

  - `200` (unknown)
    Successful response with a list of templates.

## Response 200 fields (application/json):

  - `data` (array)

  - `data.collections` (array)

  - `data.collections.created_at` (string, required)

  - `data.collections.id` (string, required)

  - `data.collections.templates` (array)

  - `data.collections.title` (object, required)

  - `data.collections.updated_at` (string, required)

  - `data.created_at` (string, required)

  - `data.default_document_name` (object, required)

  - `data.description` (object, required)

  - `data.id` (string, required)

  - `data.jurisdictions` (array)

  - `data.jurisdictions.code` (string, required)

  - `data.jurisdictions.id` (string, required)

  - `data.languages` (array)

  - `data.languages.code` (string, required)

  - `data.languages.id` (string, required)

  - `data.short_description` (object, required)

  - `data.title` (object, required)

  - `data.updated_at` (string, required)

  - `meta` (object)

  - `meta.status` (object, required)

  - `meta.status.code` (integer, required)
    Example: 200

  - `meta.status.text` (string, required)
    Example: OK

  - `meta.pagination` (object, required)

  - `meta.pagination.items` (integer, required)
    Number of items in the current page.
    Example: 15

  - `meta.pagination.total` (integer, required)
    Total number of items across all pages.
    Example: 51

  - `meta.pagination.has_pages` (boolean, required)
    Whether there are multiple pages.
    Example: true

  - `meta.pagination.is_first` (boolean, required)
    Whether the current page is the first page.
    Example: true

  - `meta.pagination.pointer` (object, required)
    Page navigation pointers.

  - `meta.pagination.pointer.previous` (any, required)
    Previous page number, or null if on the first page.
    Example: null

  - `meta.pagination.pointer.current` (integer, required)
    Current page number.
    Example: 1

  - `meta.pagination.pointer.next` (any, required)
    Next page number, or null if on the last page.
    Example: 2

