---
title: "Delete Document"
method: DELETE
path: "/api/v1/knowledge/documents/{document_id}"
tags: ["knowledge-documents"]
---

# Delete Document

`DELETE /api/v1/knowledge/documents/{document_id}`

## Request

- Base URL: `https://api.gnosari.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gnosari.com/api/v1/knowledge/documents/{document_id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-AUTH-TOKEN`

Queue document deletion (async).

Returns immediately with job_id. Actual deletion happens in background.
The document will be removed from OpenSearch.

**Path Parameters:**
- `document_id`: OpenSearch document ID to delete

**Security:**
Documents are deleted from the user's account-specific index.
Users can only delete documents from their own account.

**Tracking:**
Poll the document endpoint - if it returns 404, deletion is complete.

## Path parameters

- `document_id` string, required

## Response `200`

Successful Response

- DeletionResponse: Response schema for async deletion operations. Deletion is queued and processed asynchronously via the neoqueue outbox. Poll GET /collections to check status.
  - `job_id` string, required: Event ID for tracking the deletion (outbox event)
  - `status` string: Current status (deleting)
  - `message` string: Human-readable status message

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gnosari/apis/gnosari-api.md) · [All operations](https://skmtc.dev/gnosari/apis/gnosari-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gnosari/apis/gnosari-api/revisions/f299cf53ae5f?raw)
