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

# Count readable employee groups

> Counts non-archived groups using the same filters and access rules as GET /c/{companyId}/groups. Returns only the count. A group can match any selected category; all other supplied filters must match. Supply memberCount and memberCountOperator together.



## OpenAPI

````yaml https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/groups/count
openapi: 3.1.0
info:
  title: Windmill API
  version: 2.0.0
  description: >-
    Use the Windmill API to integrate your systems, automate workflows, and
    build applications on your organization's data. Authenticate with an API key
    or OAuth access token. Each request uses the authenticated user's
    permissions within the selected workspace.
servers:
  - url: https://api.gowindmill.com/api/v2
security:
  - bearerAuth: []
paths:
  /c/{companyId}/groups/count:
    get:
      tags:
        - Groups
      summary: Count readable employee groups
      description: >-
        Counts non-archived groups using the same filters and access rules as
        GET /c/{companyId}/groups. Returns only the count. A group can match any
        selected category; all other supplied filters must match. Supply
        memberCount and memberCountOperator together.
      operationId: groups.count
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 128
            description: >-
              Company ID. A URL slug is also accepted. The caller must have
              access to this company.
            title: Company ID
            example: company-acme
          required: true
          description: >-
            Company ID. A URL slug is also accepted. The caller must have access
            to this company.
          name: companyId
          in: path
        - schema:
            type: string
            description: >-
              Optional search text. Group and category names use a
              case-insensitive substring match.
            title: Search text
            example: Engineering
          required: false
          description: >-
            Optional search text. Group and category names use a
            case-insensitive substring match.
          name: query
          in: query
        - schema:
            type: string
            enum:
              - MANUAL
              - FILTER
              - SYNCED
              - SCIM
            description: >-
              MANUAL has an explicit roster; FILTER uses employee rules; SYNCED
              follows an integration group; SCIM is provisioned.
            title: Group type
            example: MANUAL
          required: false
          description: >-
            MANUAL has an explicit roster; FILTER uses employee rules; SYNCED
            follows an integration group; SCIM is provisioned.
          name: type
          in: query
        - schema:
            type: array
            items:
              type: string
              format: uuid
            description: >-
              One or more category UUIDs. Matching any selected category is
              sufficient.
            title: Category filter
            example:
              - 11111111-1111-4111-8111-111111111111
          required: false
          description: >-
            One or more category UUIDs. Matching any selected category is
            sufficient.
          name: categoryId
          in: query
        - schema:
            type: string
            description: >-
              Include groups with no active categories, combined with categoryId
              by OR.
            title: Include uncategorized
            example: 'true'
          required: false
          description: >-
            Include groups with no active categories, combined with categoryId
            by OR.
          name: includeUncategorized
          in: query
        - schema:
            type: array
            items:
              type: string
            description: >-
              Integration-defined group type. The group list accepts a single
              value or repeated values.
            title: External type filter
          required: false
          description: >-
            Integration-defined group type. The group list accepts a single
            value or repeated values.
          name: externalType
          in: query
        - schema:
            type: string
            enum:
              - windmill
              - scim
              - integration
            description: >-
              windmill selects MANUAL/FILTER groups; scim selects SCIM;
              integration selects SYNCED groups.
            title: Group source
            example: windmill
          required: false
          description: >-
            windmill selects MANUAL/FILTER groups; scim selects SCIM;
            integration selects SYNCED groups.
          name: source
          in: query
        - schema:
            type: string
            description: >-
              Owning integration identifier, or null for groups without an
              integration link.
            title: Integration ID
          required: false
          description: >-
            Owning integration identifier, or null for groups without an
            integration link.
          name: integrationId
          in: query
        - schema:
            type: string
            enum:
              - company
              - restricted
            description: >-
              company selects company-wide or global read access; restricted
              selects other readable groups.
            title: Sharing filter
            example: company
          required: false
          description: >-
            company selects company-wide or global read access; restricted
            selects other readable groups.
          name: visibility
          in: query
        - schema:
            type: string
            description: >-
              Employee who created this resource, or null when no employee
              creator is recorded.
            title: Creator employee ID
          required: false
          description: >-
            Employee who created this resource, or null when no employee creator
            is recorded.
          name: createdByEmployeeId
          in: query
        - schema:
            type: string
            enum:
              - lt
              - lte
              - eq
              - gt
              - gte
            description: Comparison applied to memberCount. Supply both fields together.
            title: Member count comparison
            example: gte
          required: false
          description: Comparison applied to memberCount. Supply both fields together.
          name: memberCountOperator
          in: query
        - schema:
            type:
              - integer
              - 'null'
            minimum: 0
            description: >-
              Nonnegative member count threshold. Supply memberCountOperator
              with this value.
            title: Member count
            example: 1
          required: false
          description: >-
            Nonnegative member count threshold. Supply memberCountOperator with
            this value.
          name: memberCount
          in: query
      responses:
        '200':
          description: Matching readable groups.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmployeeGroupCount'
        '400':
          description: Bad request or request validation failed
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - BAD_REQUEST
                          message:
                            type: string
                          requestId:
                            type: string
                        required:
                          - code
                          - message
                          - requestId
                    required:
                      - error
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - VALIDATION_ERROR
                          message:
                            type: string
                          requestId:
                            type: string
                          details:
                            type: array
                            items:
                              type: object
                              properties:
                                path:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                message:
                                  type: string
                              required:
                                - path
                                - message
                        required:
                          - code
                          - message
                          - requestId
                          - details
                    required:
                      - error
        '401':
          description: >-
            Authentication is missing or invalid. Send a valid API key or OAuth
            access token in the Authorization: Bearer <TOKEN> header before
            retrying.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - UNAUTHORIZED
                      message:
                        type: string
                      requestId:
                        type: string
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - FORBIDDEN
                      message:
                        type: string
                      requestId:
                        type: string
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - NOT_FOUND
                      message:
                        type: string
                      requestId:
                        type: string
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
        '429':
          description: >-
            The API-client request budget is exhausted. API keys allow 500
            requests per minute per key; OAuth clients allow 500 per minute per
            client and workspace. Reads and writes share the budget. One HTTP
            request counts once, including bulk requests. Wait for the
            Retry-After delay before retrying.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              required: true
              schema:
                type: integer
                minimum: 0
                example: 42
            RateLimit:
              description: >-
                Current request budget: limit is the maximum count, remaining is
                the unused count, and reset is seconds until the window resets,
                not a timestamp.
              required: true
              schema:
                type: string
                example: limit=500, remaining=0, reset=42
            RateLimit-Policy:
              description: >-
                Request limit and window length in seconds, formatted as
                <limit>;w=<seconds>.
              required: true
              schema:
                type: string
                example: 500;w=60
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - RATE_LIMITED
                      message:
                        type: string
                      requestId:
                        type: string
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
      security:
        - bearerAuth: []
components:
  schemas:
    EmployeeGroupCount:
      type: object
      properties:
        total:
          type: integer
          minimum: 0
          description: >-
            Total matching items, independent of pagination. The route
            determines the item type.
          title: Total matches
          example: 1
      required:
        - total
      title: Group or member count
      example:
        total: 1
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Use an API key or OAuth access token. Enter only the token in the
        authorization dialog; requests send it as `Authorization: Bearer
        <TOKEN>`.


        Create an API key in your workspace's **Settings → API keys**. Keys
        start with `wm_api_` and only work in the workspace where they were
        created. Read-only keys can read data; creating, updating, or deleting
        data requires a read-write key.


        ```http

        Authorization: Bearer wm_api_example

        ```


        OAuth access tokens are issued for connected Windmill applications.


        ```http

        Authorization: Bearer <OAUTH_ACCESS_TOKEN>

        ```


        Both token types use the authenticated user's workspace permissions.
        Each endpoint's permission requirements and the sharing settings of the
        requested items still apply.

````

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