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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_id | path | `string | null` | yes |
email | query | `string | null` | no |
X-Org-Id | header | `string | null` | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
Operation ID: get_org_members_count_api_organizations__org_id__members_count_get