---
openapi: delete /open/workspaces/{workspaceId}
---

# Delete Workspace

Permanently remove a workspace. This operation is irreversible and will remove all associated forms, submissions, and settings.

## Authentication & Scope

Requires the `workspaces-write` ability. User must be an **admin** of the workspace.

## Request

```http
DELETE /open/workspaces/{workspaceId} HTTP/1.1
Host: api.opnform.com
Authorization: Bearer <token>
```

### Path Parameters

| Parameter   | Type   | Description                                |
|-------------|--------|--------------------------------------------|
| workspaceId | number | ID of the workspace to delete.             |

## Response

`200 OK` – Confirmation message and the ID of the deleted workspace.

```json
{
  "message": "Workspace deleted.",
  "workspace_id": 12
}
```

`403 Forbidden` – The token lacks `workspaces-write` or you lack permission.