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

# Read the authorized workspace

> Find the workspace represented by a grant and list its active members.

Retrieve the clinician's authorized workspace and its active members.
Requires `scribe:read`.

## Read the workspace

```bash theme={null}
curl "$CORTEXA_API_BASE/teams" \
  --header "Authorization: Bearer $CORTEXA_JWT"
```

This response is an array containing the authorized workspace. Each item has
`id`, `name`, and `type`. Save its ID as `CORTEXA_WORKSPACE_ID`.

The API uses `teams` in its route names; these records represent Cortexa
workspaces. The detail endpoint returns the same workspace as a single object:

```bash theme={null}
curl "$CORTEXA_API_BASE/teams/$CORTEXA_WORKSPACE_ID" \
  --header "Authorization: Bearer $CORTEXA_JWT"
```

## List active members

```bash theme={null}
curl "$CORTEXA_API_BASE/organizations/$CORTEXA_WORKSPACE_ID/members?page=1&per_page=20" \
  --header "Authorization: Bearer $CORTEXA_JWT"
```

Use the **workspace ID** in both the `team_id` and `organization_id` path
positions. The members endpoint returns a [paginated list](/developers/errors.md#pagination).

| Member field | Description |
| - | - |
| `user_id` | Cortexa user ID |
| `name` | Member's display name, when available |
| `role` | Membership role |

Only active members of the authorized workspace are listed. The response does
not include member email addresses or subscription/billing details.

## Change workspace

Authorize the new workspace and use its grant and JWT. Switching workspaces in
the Cortexa app does not change an existing grant. Directory access does not
include other members' clinical records.


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