> ## Documentation Index
> Fetch the complete documentation index at: https://docs.raydocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Workspace

> Permanently delete a workspace and all its contents.

## Authentication & Scope

Requires the `workspaces-write` ability.

<Warning>
  This action is irreversible. All templates, sessions, documents, and results in the workspace will be permanently deleted.
</Warning>

## Request

```http theme={null}
DELETE /workspaces/1 HTTP/1.1
Host: api.raydocs.com
Authorization: Bearer <token>
```

### Path Parameters

| Parameter     | Type    | Required | Description      |
| ------------- | ------- | -------- | ---------------- |
| `workspaceId` | integer | Yes      | The workspace ID |

## Response

`204 No Content` – Workspace successfully deleted.

`404 Not Found` – Workspace does not exist or you don't have access.

`403 Forbidden` – You don't have permission to delete this workspace.


## OpenAPI

````yaml delete /workspaces/{workspaceId}
openapi: 3.0.1
info:
  title: Raydocs API
  description: REST API for document extraction with AI-powered data parsing
  version: 1.0.0
servers:
  - url: https://api.raydocs.com
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Workspace Users
    description: Manage users within a workspace.
  - name: Extraction Templates
    description: Define extraction schemas and settings.
  - name: Extraction Sessions
    description: Manage extraction jobs and documents.
  - name: Batch Operations
    description: Bulk operations on sessions.
  - name: Documents
    description: Upload and manage source documents.
  - name: Workflows
    description: Discover workflow runs and read their public outputs.
  - name: Results
    description: Access extraction results.
paths:
  /workspaces/{workspaceId}:
    delete:
      tags:
        - Workspaces
      summary: Delete Workspace
      description: Permanently delete a workspace. Requires `workspaces-write`.
      operationId: deleteWorkspace
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: Deleted
        '403':
          description: Forbidden
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Personal Access Token created from the Raydocs dashboard.

        Include in the Authorization header: `Bearer <your_token>`

        See [API Keys](/api-reference/api-keys) for token creation and
        management.

````