Skip to main content
DELETE
Preview. This endpoint is available to organisations in the Wordsmith MCP pilot. Other organisations receive 403 mcp_not_enabled. See the preview overview.
Removes one document from a repository and from the search index. The file behind it is deleted too: the repository owns the file of each document it holds (see Add Documents), so that file_id stops working. Download it first if you need to keep it. Only a document added as a file can be removed on its own. A document synced from a connected source, such as a SharePoint folder, comes back on the next sync: remove the source in the app instead. Reports whose rows follow this repository lose the document’s row and its cells.

Authentication

Requires an API key, or an OAuth token with repositories:write. The caller also needs edit access to the repository.

Path parameters

string
required
The repository id.
string
required
The document id, not the file_id.

Response

Returns 204 with no body. The document disappears from listings at once; its file and index entries are removed in the background.

Errors