Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Delete document

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//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.

DELETE/projects/{projectId}/documents/{id}
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstringrequired
Project ID
idstringrequired
Document ID
Responses
204Document deleted successfully
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Document not found
Request
curl -X DELETE "https://leadtime.app/api/public/projects/string/documents/string" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
Document deleted successfully