/v1/workspaces/{workspace_uid}Permanently deletes a workspace you own, together with its members, pending invitations and
any leftover records. The audit history is kept but no longer linked to the workspace. This
endpoint needs no X-Workspace-Slug header.
You can only delete a workspace when:
- you are its owner (other members get
404), - it is not your default workspace, and
- it has no VMs, volumes, databases, Kubernetes clusters, storage buckets or deployments left. Delete those first.
The response contains the deleted workspace. role and permissions are not included.
Authentication
Send your API key as Authorization: Bearer <token>.
Path parameters
workspace_uidstringRequiredThe workspace's uid. When the route also takes X-Workspace-Slug, both must name the same workspace.
Response
The workspace was deleted.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
uidstringRequiredUnique identifier of the workspace. Used in /v1/workspaces/{workspace_uid}/... paths.
namestringRequiredDisplay name.
slugstringRequiredUnique slug. Send it in X-Workspace-Slug to act in this workspace.
descriptionstringRequiredFree-text description. Empty when not set.
is_defaultbooleanRequiredWhether this is the owner's default workspace, created at signup. It cannot be deleted.
vm_exec_enabledbooleanRequiredWhether running commands on VMs through the API is allowed. See Update workspace settings.
created_atstring (date-time)RequiredWhen the workspace was created.
updated_atstring (date-time)RequiredWhen the workspace was last changed.
rolestringYour role in the workspace. Omitted when deleting a workspace.
One ofowneradmindeveloperviewer
permissionsarray of stringsThe permissions your role grants. Omitted when deleting a workspace.
One ofworkspace.readworkspace.manageresource.writeruntime.connectsecrets.readsecrets.managemembers.manageaudit.readbilling.readbilling.manageworkspace.transferworkspace.delete
member_countintegerRequiredNumber of active members. 0 in the response to deleting a workspace.
Errors
| Status | Meaning |
|---|---|
401 | The API key is missing, invalid, expired or revoked. |
403 | The workspace cannot be deleted: default workspace cannot be deleted or workspace still has resources; delete the resources first. |
404 | No workspace with this uid is owned by you (workspace not found). |
Errors use the standard error format.