Documentation
Account and keys
View .mdOpenAPI

Get the key's workspace

GEThttps://weights.fyi/run/v1/workspacesscope: read
text
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

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and your token, with the read scope.

Return value

200 OK:

FieldMeaning
workspace.id, workspace.name, workspace.owner_id, workspace.created_atThe key's workspace.
workspace.trace_preferenceslog_inputs and log_outputs, as GET /v1/trace-preferences reads them.
workspace.trace_sinks_countHow many trace destinations the workspace has, paused ones included.
workspace.governed_tracingtrue when both switches are off and the count is 0.
workspace.cmknull 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.c2null 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.confidentialnull 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.domainsEmail domains claimed or verified by the workspace, with status, join_mode and dns_record.
workspacesFor 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

StatusCodeWhen it happensWhat to do
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work.Use a valid token.
403scope_requiredThe token lacks read.Use a token with read.

Examples

sh
curl -s https://weights.fyi/run/v1/workspaces -H "Authorization: Bearer $WEIGHTS_API_KEY"
json
{"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