Skip to main content

Get org members count

GET /api/organizations/{org_id}/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

Parameters

NameInTypeRequiredDescription
org_idpath`stringnull`yes
emailquery`stringnull`no
X-Org-Idheader`stringnull`no

Responses

StatusDescription
200Successful Response
422Validation Error

Operation ID: get_org_members_count_api_organizations__org_id__members_count_get