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

# List groups

> Return a paginated list of contact groups in the workspace.

Returns a Laravel-paginated list of groups.

## Endpoint

```
GET /api/v1/{subdomain}/groups
```

Required ability: `groups.read`.

## Headers

| Header          | Value                        |
| --------------- | ---------------------------- |
| `Authorization` | `Bearer <your-64-hex-token>` |
| `Accept`        | `application/json`           |

## Path parameters

<ParamField path="subdomain" type="string" required={true}>
  Your workspace subdomain.
</ParamField>

## Query parameters

<ParamField query="page" type="integer" required={false}>
  1-indexed page number. Defaults to `1`.
</ParamField>

<ParamField query="per_page" type="integer" required={false}>
  Items per page. Defaults to `15`, maximum `100`.
</ParamField>

## Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://dash.xobito.com/api/v1/acme/groups" \
    -H "Authorization: Bearer <your_token>" \
    -H "Accept: application/json"
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch("https://dash.xobito.com/api/v1/acme/groups", {
    headers: {
      Authorization: "Bearer <your_token>",
      Accept: "application/json",
    },
  });
  const body = await res.json();
  ```

  ```python Python theme={null}
  import requests

  r = requests.get(
      "https://dash.xobito.com/api/v1/acme/groups",
      headers={
          "Authorization": "Bearer <your_token>",
          "Accept": "application/json",
      },
  )
  body = r.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://dash.xobito.com/api/v1/acme/groups');
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer <your_token>',
          'Accept: application/json',
      ],
  ]);
  $body = json_decode(curl_exec($ch), true);
  curl_close($ch);
  ```
</CodeGroup>

## Example response

```json 200 OK theme={null}
{
  "status": "success",
  "data": {
    "current_page": 1,
    "data": [
      {
        "id": 7,
        "tenant_id": 13,
        "name": "VIP Customers",
        "created_at": "2026-04-01T10:00:00.000000Z",
        "updated_at": "2026-04-01T10:00:00.000000Z"
      }
    ],
    "per_page": 15,
    "total": 4,
    "last_page": 1,
    "from": 1,
    "to": 4,
    "path": "https://dash.xobito.com/api/v1/acme/groups"
  }
}
```

See [Data Types → Group](/developers/data-types#group).

## Error responses

| Status | When                    | Body                                                                                   |
| ------ | ----------------------- | -------------------------------------------------------------------------------------- |
| `401`  | Missing / invalid token | `{"status":"error","message":"Invalid API token"}`                                     |
| `403`  | Missing ability         | `{"status":"error","message":"Token does not have the required ability: groups.read"}` |
| `429`  | Rate limit              | `{"message":"Too many requests","retry_after":45}`                                     |
| `500`  | Server error            | `{"status":"error","message":"Failed to list groups"}`                                 |
