Skip to content

Bootstrap API

The Bootstrap API returns everything a client needs to initialize: the authenticated user’s identity, their workspaces, and the active workspace’s shell configuration. The web UI calls this on page load.

Bootstrap is the discovery endpoint — the one place the server picks a default workspace for the caller. Data endpoints (/mcp, /v1/chat, /v1/tools/call, /v1/shell, /v1/events) treat X-Workspace-Id as authoritative and reject requests that omit it. Same header name, different strictness by endpoint class.

Returns the current user, their workspaces with roles, and the shell configuration for the active workspace.

Request headers:

HeaderRequiredDescription
AuthorizationYesBearer <token> — see Authentication
X-Workspace-IdNoSoft hint. If present and the user is a member of this workspace, it becomes activeWorkspace in the response. Otherwise ignored and the first membership is returned. Clients use this to restore a user’s last-selected workspace from local storage.

Response:

{
"user": {
"id": "user_abc123",
"name": "Mat",
"email": "mat@example.com",
"role": "owner"
},
"workspaces": [
{
"id": "ws_engineering",
"name": "Engineering",
"role": "owner"
},
{
"id": "ws_research",
"name": "Research",
"role": "member"
}
],
"activeWorkspace": "ws_engineering",
"shell": {
"placements": [...],
"endpoints": {...}
},
"config": {
"defaultModel": "anthropic:claude-sonnet-4-6",
"maxIterations": 25,
"maxOutputTokens": 16384
}
}
FieldTypeDescription
userobjectAuthenticated user identity (id, name, email, role)
workspacesarrayWorkspaces the user belongs to, with their role in each
activeWorkspacestringID of the currently active workspace. Always populated — the server enforces the invariant that every authenticated user has at least one workspace (provisioned at login, re-created on next login if externally deleted).
shellobjectShell configuration — sidebar placements, route endpoints
configobjectRuntime configuration — model, iteration limits, token limits

Error responses:

StatusError codeCondition
401Not authenticated
500workspace_invariant_violationAuthenticated user reached bootstrap with zero workspaces. Provisioning should have run at login; this indicates a broken identity-layer path rather than client misuse.

Example:

Terminal window
curl http://localhost:27247/v1/bootstrap \
-H "Authorization: Bearer your-token"