---
title: "Get List of Templates"
method: GET
path: "/api/cmp/v1/templates"
tags: ["Templates"]
---

# Get List of Templates

`GET /api/cmp/v1/templates`

## Request

- Base URL: `https://hostname`
- URL: `https://hostname/api/cmp/v1/templates`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://{hostname}/api/access/v1/oauth/token` scopes: `COOKIE_READ`

Use this API to retrieve a paginated list of templates with their details, including template name, type, current version, and status.

## Query parameters

- `searchStr` string
- `sortBy` 'templateName' | 'templateType' | 'status' | 'currentVersion'
- `direction` 'asc' | 'desc'
- `page` integer
- `size` integer

## Response `200`

OK

- PageTemplateDto
  - `totalPages` integer
  - `totalElements` integer
  - `size` integer
  - `content` TemplateDto[]
    - `id` string, uuid: UUID of the template
    - `currentVersion` integer: The current version number of the template
    - `templateName` string: Name of the template
    - `templateType` 'GDPR' | 'IAB' | 'CCPA' | 'IAB2' | 'GENERIC' | 'LGPD' | 'GENERIC_PROMPT' | 'CPRA' | 'CDPA' | 'USNATIONAL' | 'COLORADO' | 'CTDPA' | 'UCPA' | 'QUEBEC' | 'IABC' | 'IAB2V2' | 'OCPA' | 'MODPA' | 'VCDPA' | 'UKGDPR' | 'IND_DPDPA' | 'CUSTOM': The category of the template
    - `status` 'DRAFTED' | 'ACTIVATED': The template's status, published if status is ACTIVATED
    - `isDefault` boolean: Indicates if the template is the default template
    - `isUniversalDefault` boolean: Indicates if the template is the universal default template
    - `isOrgDefault` boolean: Indicates if the template is the default template for the organization
    - `orgDefaultEnabled` boolean: Indicates if the organization default is enabled
    - `orgId` string: Organization ID
    - `orgName` string: Organization name
    - `languages` string[]: List of enabled language codes for this template
  - `number` integer
  - `sort` SortObject
    - `empty` boolean: This flag indicates whether the result set is empty.
    - `sorted` boolean: This flag indicates whether the results are sorted.
    - `unsorted` boolean: This flag indicates whether the results are in unsorted order.
  - `pageable` PageableObject
    - `offset` integer: The starting position for paginated results.
    - `sort` SortObject
      - `empty` boolean: This flag indicates whether the result set is empty.
      - `sorted` boolean: This flag indicates whether the results are sorted.
      - `unsorted` boolean: This flag indicates whether the results are in unsorted order.
    - `paged` boolean: This flag indicates whether pagination is enabled.
    - `pageSize` integer: The number of items displayed per page.
    - `pageNumber` integer: The current page number in the pagination sequence.
    - `unpaged` boolean: This flag indicates whether pagination is disabled.
  - `first` boolean
  - `last` boolean
  - `numberOfElements` integer
  - `empty` boolean

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests. For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500`: Internal Server Error

---

[API](https://skmtc.dev/onetrust/apis/consent-preferences-cookie-consent.md) - [All operations](https://skmtc.dev/onetrust/apis/consent-preferences-cookie-consent/llms.txt) - [OpenAPI document](https://skmtc.dev/onetrust/apis/consent-preferences-cookie-consent/revisions/b4fb4606f973?raw)
