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

# Get Org Members Count

> Get count of organization members with optional email filter.

This endpoint returns the total count of organization members matching
the filter criteria. Access requires the VIEW_ORG_SETTINGS permission,
which is granted to all organization members (member, admin, and owner roles).

Args:
    org_id: Organization ID (UUID)
    email: Optional email filter (case-insensitive partial match)
    user_id: Authenticated user ID (injected by require_permission dependency)

Returns:
    int: Total count of organization members matching the filter

Raises:
    HTTPException: 401 if user is not authenticated
    HTTPException: 403 if user lacks VIEW_ORG_SETTINGS permission or is not a member
    HTTPException: 400 if org_id format is invalid
    HTTPException: 500 if retrieval fails



## OpenAPI

````yaml /openapi/openhands-cloud.json get /api/organizations/{org_id}/members/count
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/organizations/{org_id}/members/count:
    get:
      tags:
        - Orgs
      summary: Get Org Members Count
      description: >-
        Get count of organization members with optional email filter.


        This endpoint returns the total count of organization members matching

        the filter criteria. Access requires the VIEW_ORG_SETTINGS permission,

        which is granted to all organization members (member, admin, and owner
        roles).


        Args:
            org_id: Organization ID (UUID)
            email: Optional email filter (case-insensitive partial match)
            user_id: Authenticated user ID (injected by require_permission dependency)

        Returns:
            int: Total count of organization members matching the filter

        Raises:
            HTTPException: 401 if user is not authenticated
            HTTPException: 403 if user lacks VIEW_ORG_SETTINGS permission or is not a member
            HTTPException: 400 if org_id format is invalid
            HTTPException: 500 if retrieval fails
      operationId: get_org_members_count_api_organizations__org_id__members_count_get
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Org Id
        - name: email
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 255
                minLength: 1
              - type: 'null'
            title: Filter members by email (case-insensitive partial match)
        - name: X-Org-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Org-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: integer
                title: >-
                  Response Get Org Members Count Api Organizations  Org Id 
                  Members Count Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token

````