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

# Delete a workspace

> ⚠️ **ALPHA ENDPOINT** - This endpoint is in alpha and subject to breaking changes. Use with caution in production environments.

Soft-delete a custom workspace you own.

The workspace and its memberships are marked as deleted but retained for the configured recovery period; collection data (documents, chunks, embeddings) is preserved until the workspace is permanently deleted by the cleanup task. The workspace can be restored within the recovery period via `PATCH` with `deleted_at=null` (use `?include_deleted=true` to address it after deletion).

**Restrictions:**
- PERSONAL workspaces cannot be deleted (system-managed) — returns 403
- Caller must be an OWNER of the workspace (or hold instance/company workspace-delete permission)



## OpenAPI

````yaml /api-reference/api-console.yaml delete /api/v3/workspaces/{id}
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.12.0 (v1)
  description: >-
    LightOn gives you an API to search, parse, and ingest documents at scale.
    Build knowledge-retrieval pipelines without managing vector databases or OCR
    models.
servers:
  - url: https://api.lighton.ai
security: []
tags:
  - name: Ask
    description: >-
      Retrieval-augmented generation: search your indexed corpus and generate an
      LLM answer grounded in the retrieved passages. Supports streaming (SSE)
      and synchronous modes.
  - name: Search
    description: >-
      Hybrid vector + text retrieval over your indexed corpus. Returns ranked
      passages with provenance (file, page range, workspace). Optional reranking
      and vision mode.
  - name: Files
    description: Upload, list, fetch, and delete documents indexed in your workspaces.
  - name: Facets
    description: >-
      Organise documents with hierarchical content types and custom attributes
      per file. Start from starter templates or build your own classification
      schema from scratch.
  - name: Tags
    description: >-
      Manage flat, company-wide labels used to scope search and group content
      across workspaces.
  - name: Workspaces
    description: >-
      Create and manage workspaces — the access-controlled containers your
      documents live in.
  - name: Parse
    description: >-
      Convert documents into structured Markdown — PDFs, images, Office files,
      and HTML. Synchronous endpoint capped at 20 MB / 15 pages.
  - name: Extract
    description: >-
      Pull typed fields out of documents using a JSON Schema you provide. Sync
      mode for small documents (≤20 MB / 15 pages); async mode for larger jobs
      (≤100 MB / 1000 pages) with polling on a job ID.
  - name: API Keys
    description: >-
      Provision and revoke API keys used to authenticate against the Console
      API.
  - name: Budget
    description: >-
      Manage your organization's monthly spend budget and alert thresholds. Set
      a hard cap that blocks API requests when reached, and configure email
      notifications at custom spend percentages.
paths:
  /api/v3/workspaces/{id}:
    delete:
      tags:
        - Workspaces
      summary: Delete a workspace
      description: >-
        ⚠️ **ALPHA ENDPOINT** - This endpoint is in alpha and subject to
        breaking changes. Use with caution in production environments.


        Soft-delete a custom workspace you own.


        The workspace and its memberships are marked as deleted but retained for
        the configured recovery period; collection data (documents, chunks,
        embeddings) is preserved until the workspace is permanently deleted by
        the cleanup task. The workspace can be restored within the recovery
        period via `PATCH` with `deleted_at=null` (use `?include_deleted=true`
        to address it after deletion).


        **Restrictions:**

        - PERSONAL workspaces cannot be deleted (system-managed) — returns 403

        - Caller must be an OWNER of the workspace (or hold instance/company
        workspace-delete permission)
      operationId: api_v3_workspaces_destroy
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: The unique identifier of the workspace.
          required: true
      responses:
        '204':
          description: Workspace soft-deleted
        '401':
          description: Unauthenticated - Missing or invalid API key/session cookie
        '403':
          description: >-
            Forbidden - System-managed workspace or caller lacks owner
            permission
        '404':
          description: Not Found - Workspace does not exist
      security:
        - bearerAuth: []
        - {}
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````