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

# List groups

> Lists your organization's groups, oldest first.

**Each group includes**
- Its name, with the same ID as the `group` analytics breakdown
- How many members it has
- Whether new members join it by default, and whether SSO adds members to it

To list a group's members, pass its ID as `groupId` to `/users`. Page through results with `cursor`.

Requires the Members permission (`members:read`).



## OpenAPI

````yaml /admin-api-openapi.json get /groups
openapi: 3.1.1
info:
  title: Cassidy Admin API
  description: Read your organization's usage analytics and activity in Cassidy.
  version: 1.0.0
servers:
  - url: https://app.cassidyai.com/api/admin/v1
security: []
tags:
  - name: Analytics
    description: >-
      Usage totals over time, or broken down by user, group, Agent, Workflow,
      source, or plugin.
  - name: Workflow runs
    description: Individual Workflow runs, with who started them and their status.
  - name: Chats
    description: Agent chats, with who started them and the Agent they used.
  - name: Meetings
    description: >-
      Meetings recorded by the Cassidy notetaker, with their owners and
      participants.
  - name: Knowledge Base
    description: Knowledge Base collections, folders, and files.
  - name: Users
    description: Your organization's members, with their roles and groups.
  - name: Groups
    description: Your organization's groups.
  - name: Audit logs
    description: Audit log events for activity in your organization.
externalDocs:
  url: https://docs.cassidyai.com/reference/admin-api
paths:
  /groups:
    get:
      tags:
        - Groups
      summary: List groups
      description: >-
        Lists your organization's groups, oldest first.


        **Each group includes**

        - Its name, with the same ID as the `group` analytics breakdown

        - How many members it has

        - Whether new members join it by default, and whether SSO adds members
        to it


        To list a group's members, pass its ID as `groupId` to `/users`. Page
        through results with `cursor`.


        Requires the Members permission (`members:read`).
      operationId: listGroups
      parameters:
        - in: query
          name: limit
          schema:
            description: Maximum number of records to return.
            default: 100
            type: integer
            minimum: 1
            maximum: 1000
          description: Maximum number of records to return.
        - in: query
          name: cursor
          schema:
            description: The `nextCursor` from the previous page.
            type: string
          description: The `nextCursor` from the previous page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  nextCursor:
                    description: >-
                      Pass as `cursor` to get the next page. Null on the last
                      page.
                    type:
                      - string
                      - 'null'
                  groups:
                    type: array
                    items:
                      $ref: '#/components/schemas/Group'
                required:
                  - nextCursor
                  - groups
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '429':
          description: Too many requests
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              required: true
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.TOO_MANY_REQUESTS'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - bearerAuth:
            - members:read
components:
  schemas:
    Group:
      type: object
      properties:
        id:
          type: string
          description: The same ID as the `group` analytics breakdown and filter.
        name:
          type: string
        createdAt:
          type: string
        memberCount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Current members of the group. List them with `/users?groupId=`.
        isDefault:
          type: boolean
          description: Whether new members are added to this group when they join.
        ssoMapped:
          type: boolean
          description: >-
            Whether an SSO group mapping adds members to this group when they
            sign in.
      required:
        - id
        - name
        - createdAt
        - memberCount
        - isDefault
        - ssoMapped
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
      required:
        - message
        - code
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Authorization not provided
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
      required:
        - message
        - code
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Insufficient access
        code:
          type: string
          description: The error code
          example: FORBIDDEN
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
      required:
        - message
        - code
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
    error.NOT_FOUND:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Not found
        code:
          type: string
          description: The error code
          example: NOT_FOUND
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
      required:
        - message
        - code
      title: Not found error (404)
      description: The error information
      example:
        code: NOT_FOUND
        message: Not found
        issues: []
    error.TOO_MANY_REQUESTS:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Rate limit exceeded. Retry after the Retry-After interval.
        code:
          type: string
          description: The error code
          example: TOO_MANY_REQUESTS
      required:
        - message
        - code
      title: Too many requests error (429)
      description: The error information
      example:
        code: TOO_MANY_REQUESTS
        message: Rate limit exceeded. Retry after the Retry-After interval.
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
      required:
        - message
        - code
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Admin API key, starting with `cas_admin_`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.