---
title: "Delete document"
method: POST
path: "/api/index/v1/deletedocument"
tags: ["Documents"]
---

# Delete document

`POST /api/index/v1/deletedocument`

Deletes the specified document from the index. Succeeds if document is not present.

## Request body

- DeleteDocumentRequest — Describes the request body of the /deletedocument API call
  - `version` integer — Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done.
  - `datasource` string, required — datasource of the document
  - `objectType` string, required — object type of the document
  - `id` string, required — The id of the document

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `401` — Not Authorized
- `409` — Conflict

---

[API](https://skmtc.dev/gleanwork/apis/glean-api-2.md) · [All operations](https://skmtc.dev/gleanwork/apis/glean-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gleanwork/glean-api-2/revisions/8516a7bdcc02/schema)
