Skip to content

Delete a workspace

DELETE/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_uidstringRequired

The workspace's uid. When the route also takes X-Workspace-Slug, both must name the same workspace.

Response

200

The workspace was deleted.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
uidstringRequired

Unique identifier of the workspace. Used in /v1/workspaces/{workspace_uid}/... paths.

namestringRequired

Display name.

slugstringRequired

Unique slug. Send it in X-Workspace-Slug to act in this workspace.

descriptionstringRequired

Free-text description. Empty when not set.

is_defaultbooleanRequired

Whether this is the owner's default workspace, created at signup. It cannot be deleted.

vm_exec_enabledbooleanRequired

Whether running commands on VMs through the API is allowed. See Update workspace settings.

created_atstring (date-time)Required

When the workspace was created.

updated_atstring (date-time)Required

When the workspace was last changed.

rolestring

Your role in the workspace. Omitted when deleting a workspace.

One ofowneradmindeveloperviewer

permissionsarray of strings

The permissions your role grants. Omitted when deleting a workspace.

One ofworkspace.readworkspace.manageresource.writeruntime.connectsecrets.readsecrets.managemembers.manageaudit.readbilling.readbilling.manageworkspace.transferworkspace.delete

member_countintegerRequired

Number of active members. 0 in the response to deleting a workspace.

Errors

StatusMeaning
401The API key is missing, invalid, expired or revoked.
403The workspace cannot be deleted: default workspace cannot be deleted or workspace still has resources; delete the resources first.
404No workspace with this uid is owned by you (workspace not found).

Errors use the standard error format.