Get the key's workspace
GET https://weights.fyi/run/v1/workspaces
Authorization: Bearer <token> scope: read- Available since
- 2026-10-20 workspace registration from code: included in this build; see What is live for deployment status.
- Answer time
- synchronous: a few rows are read.
The workspace the key belongs to, as a program needs to see it before it works there: its identity, its trace switches, how many trace destinations it has, its confidential mode, its claimed email domains, and governed_tracing, which is true only when both switches are off and no destination exists. A program that must leave no content here reads this first and refuses to go on while it is false. A personal workspace's key lists every workspace its person belongs to; a shared workspace's key lists that workspace alone.
Reading needs only the read scope and has no side effect, so a program may read it before every job. trace_sinks_count counts paused destinations too: a destination that could be switched back on is a place content could go, so the workspace is not called governed while one exists.
Request
| Name | Where | Required | Meaning |
|---|---|---|---|
Authorization | header | yes | Bearer and your token, with the read scope. |
Return value
200 OK:
| Field | Meaning |
|---|---|
workspace.id, workspace.name, workspace.owner_id, workspace.created_at | The key's workspace. |
workspace.trace_preferences | log_inputs and log_outputs, as GET /v1/trace-preferences reads them. |
workspace.trace_sinks_count | How many trace destinations the workspace has, paused ones included. |
workspace.governed_tracing | true when both switches are off and the count is 0. |
workspace.cmk | null when never bound; otherwise tenant_id, client_id, vault, key_name, key_version, canonical kid, state (active or revoked), bound_at and nullable revoked_at. References only; never key material. |
workspace.c2 | null when never bound; otherwise tenant_id, client_id, subscription_id, resource_group, vms, state (active or revoked), bound_at and nullable revoked_at. References only; never a credential. |
workspace.confidential | null when no confidential mode is bound, whether never set or revoked with {"state": "revoked"}; otherwise "shared" or "dedicated", as POST /v1/workspaces bound it. While it is set, a plain chat or classify call answers 400 encrypted_envelope_required: the call must carry encrypted_envelope. |
workspace.domains | Email domains claimed or verified by the workspace, with status, join_mode and dns_record. |
workspaces | For a personal workspace's key, every workspace its person belongs to; for a shared workspace's key, that workspace alone; empty for a key no person issued. |
Errors
| Status | Code | When it happens | What to do |
|---|---|---|---|
401 | unauthorized, invalid_token, token_revoked, token_expired | No token, or one that does not work. | Use a valid token. |
403 | scope_required | The token lacks read. | Use a token with read. |
Examples
curl -s https://weights.fyi/run/v1/workspaces -H "Authorization: Bearer $WEIGHTS_API_KEY"{"workspace": {"id": 7, "name": "awow-io", "owner_id": 1, "created_at": "2026-10-20T12:00:00Z", "cmk": null, "c2": null, "confidential": null, "trace_preferences": {"log_inputs": false, "log_outputs": false}, "trace_sinks_count": 0, "governed_tracing": true, "domains": []}, "workspaces": [{"id": 7, "name": "awow-io", "owner_id": 1, "role": "owner", "created_at": "2026-10-20T12:00:00Z"}]}History
- 2026-10-20 workspace registration from code: added.
- 2026-10-20 Rung 1: fixed-version CMK binding and revocation state.
- 2026-10-20 Mode C2: the workspace's Azure VM binding and its revocation state.
- 2026-11-16:
workspace.confidential, already in the answer, is documented.
See also
- POST /v1/workspaces to register a workspace with its switches off.
- Teams and workspaces, the topic.