> ## Documentation Index
> Fetch the complete documentation index at: https://thehyperstack.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List All Groups

### Description

This endpoint allows you to **retrieve all credential groups** belonging to your organization, with support for pagination.

> **Legacy endpoint:** `GET /v1/group/all` is also supported for backward compatibility.

### Headers

<ParamField header="Authorization" type="string" required="true">
  Bearer YOUR\_API\_TOKEN — obtainable from **Hyperstack Dashboard → Settings → API Access**
</ParamField>

### Body Parameters

<ParamField body="page" type="number" required="false">
  The page number for pagination (default is `1`).
</ParamField>

<ParamField body="page_size" type="number" required="false">
  The number of groups to return per page (default is `100`).
</ParamField>

### Success Response Fields

<ResponseField name="success" type="boolean">
  Indicates whether the request was successful.
</ResponseField>

<ResponseField name="total" type="number">
  Total number of credential groups in your organization.
</ResponseField>

<ResponseField name="groups" type="array[object]">
  Array of credential group objects. Each object contains:

  * `title` — group title
  * `group_id` — unique key of the group
  * `description` — group description
  * `website` — associated URL
  * `group_code` — short code for the group
</ResponseField>

<ResponseField name="page" type="number">
  Current page number.
</ResponseField>

<ResponseField name="page_size" type="number">
  Number of groups returned per page.
</ResponseField>

### Responses

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "success": true,
    "total": 2,
    "page": 1,
    "page_size": 100,
    "groups": [
      {
        "title": "Cloud Certification",
        "group_id": "GcI6H5b66a3v",
        "description": "Awarded to cloud engineers who complete the certification program.",
        "website": "https://example.com/cloud",
        "group_code": "CC-2024"
      },
      {
        "title": "Security Fundamentals",
        "group_id": "Zvw1xPIqF7J7",
        "description": "Security basics course completion certificate.",
        "website": "",
        "group_code": "SF-2024"
      }
    ]
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "detail": "Invalid token or organization not found"
  }
  ```
</ResponseExample>

```bash theme={null}
curl -X POST "https://api.thehyperstack.com/v1/groups/all" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "page": 1,
    "page_size": 100
  }'
```
