---
title: "Get Groups"
method: GET
path: "/orgunit/{orgunitId}/groups"
tags: ["Group"]
---

# Get Groups

`GET /orgunit/{orgunitId}/groups`

Retrieves a paginated list of groups associated with a specific orgunit. Supports comprehensive server-side  filtering, text searching, and categorical lookups.

## Path parameters

- `orgunitId` string, required

## Query parameters

- `pageNumber` integer, required
- `pageSize` integer, required
- `search` string
- `isDialogue` boolean
- `searchCategory` 'Group' | 'Keyword' | 'Tag'
- `groupType` 'All' | 'Public' | 'Info' | 'Whatsapp'
- `defaultTag` boolean
- `queryOperator` 'Any' | 'All'

## Response `200`

Success

- GroupResponseListPagedResponseExternalApiResponseNew
  - `data` GroupResponseListPagedResponse
    - `pageNumber` integer
    - `pageSize` integer
    - `totalPages` integer
    - `totalCount` integer
    - `data` GroupResponse[], nullable
      - `id` string
      - `orgunitId` string
      - `accountId` string
      - `name` string
      - `keywords` Keywords[], nullable
        - `id` string, nullable
        - `name` string, nullable
        - `onContact` string, nullable
        - `notificationEmails` string[], nullable
        - `notificationMobileNos` string[], nullable
        - `orgunitId` string, nullable
      - `description` string, nullable
      - `tags` string[], nullable
      - `users` User[], nullable
        - `id` string, nullable
        - `accountId` string, nullable
        - `role` string, nullable
        - `shortName` string, nullable
        - `firstName` string, nullable
        - `lastName` string, nullable
        - `imageURL` string, nullable
        - `email` string, nullable
        - `phone` string, nullable
        - `active` boolean
        - `hidden` boolean
        - `addedBy` string, nullable
        - `addedOn` string, date-time
        - `modifiedBy` string, nullable
        - `modifiedOn` string, date-time, nullable
        - `campuses` Campuses
          - `id` string, nullable
          - `isDefault` boolean
        - `preferences` Preferences
          - `helpEnabled` boolean
          - `themes` 'Light' | 'Dark'
      - `private` boolean
      - `info` boolean
      - `whatsapp` boolean
      - `notificationMobileNos` string[], nullable
      - `notificationEmails` string[], nullable
      - `chatEnabled` boolean
      - `autoReponse` boolean
      - `autoResponseMessage` string, nullable
      - `status` string, nullable
      - `groupTrackingCode` string, nullable
  - `appCode` string, nullable
  - `message` string, nullable
  - `isError` boolean

## Other responses

- `400` — Bad Request
- `403` — Forbidden

---

[API](https://skmtc.net/ministrybytext/apis/pbt-api-documentation.md) · [All operations](https://skmtc.net/ministrybytext/apis/pbt-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ministrybytext/pbt-api-documentation/versions/ca6e9c8f430d/schema)
