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

# Delete a company workspace

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

Soft-delete a custom workspace in your company.

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)
- Caller must have permission to delete workspaces in their company



## OpenAPI

````yaml /api-reference/openapi-v3-company.yaml delete /api/v3/company/workspaces/{id}
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.15.0 (v3-company)
  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://paradigm.lighton.ai
security: []
tags:
  - name: Models
    description: Operations about AI models
  - name: Workspaces
    description: Operations about workspaces
  - name: Users
    description: Operations about users
  - name: User Groups
    description: Operations about user groups
  - name: Companies
    description: Operations about companies
paths:
  /api/v3/company/workspaces/{id}:
    delete:
      tags:
        - Workspaces
      summary: Delete a company 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 in your company.


        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)

        - Caller must have permission to delete workspaces in their company
      operationId: api_v3_company_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 permission
        '404':
          description: Not Found - Workspace does not exist or belongs to another company
        '503':
          description: >-
            API is under maintenance. Check `GET /api/v3/system/status` for
            active periods and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceMaintenance503'
      security:
        - bearerAuth: []
        - {}
components:
  schemas:
    ServiceMaintenance503:
      type: object
      description: >-
        Returned by the maintenance middleware when the requested endpoint is
        blocked.
      required:
        - detail
        - error
        - mode
      properties:
        detail:
          type: string
          example: System is under maintenance.
        error:
          type: string
          example: service_maintenance
        mode:
          type: string
          enum:
            - full_shutdown
            - warning_banner
          description: >-
            `full_shutdown` blocks all traffic; `warning_banner` also blocks and
            shows a dismissible toast.
        reason:
          type: string
          description: Operator-supplied maintenance reason, if any.
        started_at:
          type: string
          format: date-time
        endpoint_category_names:
          type: array
          items:
            type: string
          description: >-
            Non-empty only for category-scoped periods. Empty means all
            endpoints are affected.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````