---
title: "Get List of Consent Groups"
method: GET
path: "/api/consent/v2/consent-groups"
tags: ["Consent Groups"]
---

# Get List of Consent Groups

`GET /api/consent/v2/consent-groups`

## Request

- Base URL: `https://hostname`
- URL: `https://hostname/api/consent/v2/consent-groups`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://{hostname}/api/access/v1/oauth/token` scopes: `CONSENT`, `CONSENT_READ`

Use this API to retrieve a list of all Consent Groups along with details such as the Consent Group ID, associated Purpose Rules, and the list of data subjects and/or Consent Groups within its hierarchal structure.

## Query parameters

- `name` string

## Response `200`

Successfully retrieved list of Consent Groups.

- ConsentAPIPageConsentGroupListDto
  - `content` ConsentAPIConsentGroupListDto[]: The list of items for the current page.
    - `consentGroupId` string, uuid: Unique identifier identifying a Consent Group
    - `name` string: The Consent Group name
    - `externalName` string: The Consent Group's external name. If not provided, this will be generated based on the name
  - `empty` boolean: The flag to check if the entity is empty or not.
  - `first` boolean: The flag to check if the entity is first entity or not.
  - `last` boolean: The flag to check if the entity is last entity or not.
  - `number` integer: The number associated with the result.
  - `numberOfElements` integer: Total number of elements in the result.
  - `pageable` ConsentAPIPageableObject
    - `offset` integer
    - `sort` ConsentAPISortObject
      - `empty` boolean
      - `sorted` boolean
      - `unsorted` boolean
    - `pageNumber` integer
    - `paged` boolean
    - `pageSize` integer
    - `unpaged` boolean
  - `sort` ConsentAPISortObject
    - `empty` boolean
    - `sorted` boolean
    - `unsorted` boolean
  - `totalPages` integer: Total number of pages in the result list.
  - `totalElements` integer: Total number of elements in the result.
  - `size` integer: Size of the result list.

## 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-universal-consent-preference-management.md) - [All operations](https://skmtc.dev/onetrust/apis/consent-preferences-universal-consent-preference-management/llms.txt) - [OpenAPI document](https://skmtc.dev/onetrust/apis/consent-preferences-universal-consent-preference-management/revisions/fe4a0697ec9d?raw)
