Endpoints
Workspaces
Read the workspace bound to the current API key.
GET /api/v1/workspaces returns the single workspace that owns the API key, not a catalog of workspaces.
Any valid bearer scope. Missing token → 401 { "error": "Valid bearer API key is required" }. If that workspace id is absent from the platform snapshot → 404 { "error": "Workspace not found" }.
There is no v1 create/update/archive, no Idempotency-Key, and no pagination.
Endpoints
| Method | Path | Envelope |
|---|---|---|
| GET | /api/v1/workspaces | { workspace } |
Session twin: GET /api/workspaces. Preferences live on Settings. Members: Workspace members.
Workspace object
| Field | Type |
|---|---|
id | string |
name | string |
slug | string |
role | Owner | Admin | Member | Viewer (role of the snapshot membership used to map the workspace, not a request body) |
createdAt | ISO timestamp |
status | active | archived |
The handler loads listWorkspaces() and picks item.id === apiKey.workspaceId. It does not call listWorkspacesForUser.
Known gaps
- Path is plural; response is one workspace.
- No POST/PATCH/DELETE on v1.
roleon the object is not the API key's role; member roles are on/workspace-members.- Switching workspaces is not an API operation (the key is already bound).
