---
title: "Delete mixed document"
method: POST
path: "/v1/document/mixed/remove"
tags: ["File Commands"]
---

# Delete mixed document

`POST /v1/document/mixed/remove`

## Request

- Base URL: `https://api.ocrolus.com`
- URL: `https://api.ocrolus.com/v1/document/mixed/remove`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://auth.ocrolus.com/oauth/token`

Deletes a mixed <<glossary:Document>> uploaded to a <<glossary:Book>>.

---

Before deleting a mixed document, make sure all its child documents have finished processing. You can proceed with deletion if the child documents are in **`VERIFICATION_COMPLETE`**, **`COMPLETED`**, **`FAILED`**, or **`REJECTED`** state. Any child documents already marked as **`DELETED`** or **`DELETING`** are automatically skipped.

The deletion will fail if any child document is still being processed such as, in **`QUEUED`**, **`PROCESSING`**, **`VERIFYING`**, or **`GROOMING`** state. It will also fail if the mixed document itself is already in **`DELETING`** or **`DELETED`** state.

> 🚧 No turning back!
  > Deleted <<glossary:mixed document>>s and their associated data, such as transactions, cannot be recovered. Make sure you want to proceed before deleting.

## Request body

- object
  - `pk` integer: The PK of the Mixed <<glossary:Document>> to delete. Required if `doc_uuid` is not provided.
  - `doc_uuid` string: The unique identifier of the mixed <<glossary:Document>> to delete. Required if `pk` is not provided.

## Response `200`

Success

- object
  - `status` integer: A numerical code that indicates the status of the request.
  - `message` string: A short message describing the result of the request.
  - `response` object: An object received from the server that potentially contains data.
    - `pk` integer: The <<glossary:PK>> of the deleted mixed document.
    - `id` integer: Unique identifier of the deleted <<glossary:Document>>. Same as `pk`.
    - `checksum` string: The checksum of the deleted mixed document.
    - `created_ts` string, date-time: The timestamp when the mixed document was created.
    - `book_pk` integer: The <<glossary:PK>> of the <<glossary:Book>> that this mixed document was uploaded to.
    - `name` string: Name of the deleted mixed document.
    - `page_count` integer: Number of pages in the deleted mixed document.
    - `document_status` string: Verification status of the deleted mixed document.

## Other responses

- `400`: Client Errors
- `500`: Internal Server Error

---

[API](https://skmtc.dev/ocrolus/apis/file-commands.md) - [All operations](https://skmtc.dev/ocrolus/apis/file-commands/llms.txt) - [OpenAPI document](https://skmtc.dev/ocrolus/apis/file-commands/revisions/387371d96db7?raw)
