Rename a workspace, change its slug, set its manager, or switch its add-ons
Needs workspaces.manage. The kind cannot change. An External workspace's managerWorkspaceId names the Internal workspace that runs it, or null for none; it grants no access. An Internal workspace's addOns switches what its sidebar shows; it gates no API. Audited. Off until the workspace API is enabled for this deployment: until then it answers 404 to everyone. API keys cannot call it yet.
Authorization
bearerAuth A RemoteHost API key (rh_sk_...) or a user session token.
In: header
Path Parameters
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
application/json
application/json
application/json
curl -X PATCH "https://example.com/orgs/string/workspaces/string" \ -H "Content-Type: application/json" \ -d '{}'{ "workspace": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "kind": "internal", "name": "string", "slug": "string", "is_default": true, "manager_workspace_id": "c377aa76-177f-44e7-9bec-93e6b22d7083", "add_ons": { "issues": true, "repos": true, "agents": true }, "created_at": "string", "updated_at": "string" }}Get a workspace GET
With `workspaces.read`, or a role on a project in the workspace. A workspace the caller cannot see answers the same 404 as one that does not exist. An API key pinned to a workspace may read that workspace and no other (another workspace answers the same 404 as one that does not exist): its scopes must carry `project.read`, and the person or service account it acts as must still read every project in the org or hold a project role in that workspace. No other API key can call it. Off until the workspace API is enabled for this deployment: until then it answers 404 to everyone.
Delete an empty workspace DELETE
Needs `workspaces.manage`. Only a workspace with no projects (409 `workspace_not_empty` otherwise; never a cascade) that is not one of the org's defaults. External workspaces an Internal one managed are kept, their `manager_workspace_id` cleared. Audited. Off until the workspace API is enabled for this deployment: until then it answers 404 to everyone. API keys cannot call it yet.