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

# List Family Members

> Lists every person with access anywhere in the family and where that access comes from: members of the primary (who inherit access to every sub-workspace) and people added directly to one or more sub-workspaces.

List everyone with access anywhere in the family and where that access comes from. Members of the primary inherit access to every sub-workspace; people added directly to a sub-workspace see only that sub-workspace.

## When to use

* Access audits across all client or team workspaces.
* Showing who can reach a given sub-workspace in your own admin tool.

## Reading the response

* `scope` is `primary` for members of the primary (they have inherited access to every current and future sub-workspace) and `sub` for people added only to sub-workspaces.
* `sub_workspace_ids` lists direct sub-workspace memberships only. Inherited access is not repeated there.
* `permissions_by_workspace` gives the effective permissions per workspace id, inherited rows included, so you can render access without re-deriving it.
* `invite_status` is `success` or `pending`.

## Integration notes

* Authenticate with the primary workspace's API key.
* To add or remove people, use the workspace member endpoints against the relevant workspace; this endpoint is read-only.

## Error responses

* **400**: `Sub-workspaces cannot have their own sub-workspaces.` — the key belongs to a sub-workspace.
* **401**: Invalid or missing API key.
* **403**: `Sub-workspaces are not enabled for this workspace.`

## Example

```bash theme={null}
curl --request GET "https://prod-api.ringg.ai/ca/api/v0/workspace/sub/members" \
  --header "X-API-KEY: $RINGG_API_KEY"
```


## OpenAPI

````yaml get /workspace/sub/members
openapi: 3.0.0
info:
  title: Ringg AI API Documentation
  description: >-
    This is the documentation for the Ringg AI APIs. The Ringg AI API follows
    RESTful principles, making it intuitive and easy to integrate with your
    applications. All API requests should be made to the base URL. The API
    accepts and returns data in JSON format. Ensure your requests include the
    appropriate Content-Type header for POST and PATCH requests.
  version: 2.0.0
servers:
  - url: https://prod-api.ringg.ai/ca/api/v0
security: []
tags:
  - name: workspace
    description: Endpoints for managing your workspace.
  - name: agent
    description: Endpoints for managing assistants (agents).
  - name: calling
    description: Endpoints for making and managing calls.
  - name: campaign
    description: Endpoints for managing campaigns.
  - name: analytics
    description: Endpoints for accessing call analytics and performance metrics.
  - name: termination
    description: Endpoints for terminating active calls using different methods.
  - name: knowledgebase
    description: Endpoints for managing knowledge bases.
paths:
  /workspace/sub/members:
    get:
      tags:
        - workspace
      summary: List Family Members
      description: >-
        Lists every person with access anywhere in the family and where that
        access comes from: members of the primary (who inherit access to every
        sub-workspace) and people added directly to one or more sub-workspaces.
      operationId: listFamilyMembers
      parameters:
        - name: X-API-KEY
          in: header
          description: >-
            (Required) The API key of the PRIMARY workspace. A sub-workspace's
            key is refused with 400.
          required: true
          schema:
            type: string
            example: 7251cb4b-3373-43a4-844c-b27a1d45e0c9
      responses:
        '200':
          description: 'Successful Response: The family member matrix.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  primary_workspace_id:
                    type: string
                    example: 2f9a1c44-7e88-4bb1-9a01-5d3c2e7f6a11
                  members:
                    type: array
                    items:
                      type: object
                      properties:
                        user_id:
                          type: string
                          example: 9a4c1b77-3e21-4f66-8a12-0c5d9e3b1a44
                        email:
                          type: string
                          example: ops.head@acme.com
                        username:
                          type: string
                          example: Ops Head
                        role:
                          type: string
                          enum:
                            - owner
                            - member
                          example: owner
                        scope:
                          type: string
                          enum:
                            - primary
                            - sub
                          description: >-
                            primary = member of the primary, inherits access to
                            every sub-workspace; sub = added directly to
                            sub-workspaces only.
                          example: primary
                        sub_workspace_ids:
                          type: array
                          description: >-
                            Sub-workspaces the person was added to directly
                            (inherited access is not listed).
                          items:
                            type: string
                          example: []
                        permissions_by_workspace:
                          type: object
                          description: >-
                            Effective permissions per workspace id, inherited
                            rows included.
                          additionalProperties:
                            type: array
                            items:
                              type: string
                          example:
                            2f9a1c44-7e88-4bb1-9a01-5d3c2e7f6a11:
                              - agents
                              - numbers
                              - api_keys
                            b7c1f0e2-4d3a-4a91-9f2e-8c1d5a6b7e30:
                              - agents
                              - numbers
                              - api_keys
                        invite_status:
                          type: string
                          nullable: true
                          enum:
                            - success
                            - pending
                          example: success
              example:
                primary_workspace_id: 2f9a1c44-7e88-4bb1-9a01-5d3c2e7f6a11
                members:
                  - user_id: 9a4c1b77-3e21-4f66-8a12-0c5d9e3b1a44
                    email: ops.head@acme.com
                    username: Ops Head
                    role: owner
                    scope: primary
                    sub_workspace_ids: []
                    permissions_by_workspace:
                      2f9a1c44-7e88-4bb1-9a01-5d3c2e7f6a11:
                        - agents
                        - numbers
                        - api_keys
                      b7c1f0e2-4d3a-4a91-9f2e-8c1d5a6b7e30:
                        - agents
                        - numbers
                        - api_keys
                    invite_status: success
                  - user_id: 51e0a9d3-77b4-4a0e-b9d1-6f2a3c8e7b55
                    email: mumbai.lead@acme.com
                    username: mumbai.lead
                    role: member
                    scope: sub
                    sub_workspace_ids:
                      - b7c1f0e2-4d3a-4a91-9f2e-8c1d5a6b7e30
                    permissions_by_workspace:
                      b7c1f0e2-4d3a-4a91-9f2e-8c1d5a6b7e30:
                        - agents
                    invite_status: pending
        '400':
          description: Bad Request - The API key belongs to a sub-workspace.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Sub-workspaces cannot have their own sub-workspaces.
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: 401 Unauthorized
                      message:
                        type: string
                        example: Invalid credentials
        '403':
          description: >-
            Forbidden - Sub-workspaces are not enabled for this workspace, or
            the caller is not an active member of the primary.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Sub-workspaces are not enabled for this workspace.
        '500':
          description: Internal Server Error - Something went wrong on our end.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: 500 Internal Server Error
                      message:
                        type: string
                        example: An unexpected error occurred on the server.

````