---
search:
  tags:
    - projects
    - DELETE
seo:
  description: >-
    How deletion works: This endpoint performs a soft… Reference for the DELETE
    /projects/{projectId}/documents/{id} endpoint in the Leadtime Public API
    API.
sidebar:
  badge: DELETE
  label: Delete document
title: Delete document
type: openapi-operation
---
**How deletion works:**
This endpoint performs a soft delete - the document is marked as deleted but not permanently removed from the database. This preserves data integrity and allows for audit trails.

**What happens:**
- Document is marked with deletedAt timestamp
- Document no longer appears in list queries (GET /projects/:id/documents)
- Document details cannot be retrieved (returns 404)
- Historical data is preserved for compliance and auditing

**Validation:**
- Document must exist and belong to the specified project
- Document must belong to the current workspace
- Requires permission to manage documents

**Use cases:**
- Remove documents that are no longer needed
- Clean up draft documents
- Archive outdated versions
- Maintain data retention policies

**Note:** This is a permanent operation. There is no undo functionality. If you need to restore a deleted document, contact support.

<Operation source="api-reference" id="projectdocumentscontroller-deletedocument" />
