Skip to Content
Workspace

Set the workspace status

Sets whether a workspace may be used, and for what. `active` — everything. `restricted` — reads and exports still work, every write is refused. `blocked` — the admin panel is closed. Two surfaces are NEVER affected by any status: the public keys API (blocking it would take down the customer's own site) and login plus `GET /api/v2/me` (the owner has to be able to get in and be told why). Super roles only. A Workspace Administrator cannot reach this route — otherwise they could lift the block on their own workspace.

PUT
/api/v2/workspaces/{id}/status

Authorization

BearerAuthObject
AuthorizationBearer <token>

Machine tokens only: a personal API token or a product robot token (POST /api/v2/products/{uid}/robot-tokens). A session JWT here is 401 — the web app uses the b2t_access cookie.

In: header

Path Parameters

id*string

Workspace UUID

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/v2/workspaces/019fc817-0b94-7112-a578-66500eeec781/status" \  -H "Content-Type: application/json" \  -d '{    "status": "restricted"  }'
{  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",  "status": "restricted",  "statusSource": "manual"}