> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DeleteDocument

> DeleteDocument method in the ABBYY FlexiCapture web services API removes a document from a batch along with its export results, returning a success flag.

## What it does

Deletes a document.

<Warning>
  The document export results will be deleted together with the document.
</Warning>

## Definition

```
bool DeleteDocument( int sessionId, int batchId, int documentId );
```

## Parameters

| **Name**   | **Type** | **Description**                                              |
| ---------- | -------- | ------------------------------------------------------------ |
| sessionId  | int      | The ID of the connection to the Application Server           |
| batchId    | int      | The ID of the batch that contains the document to be deleted |
| documentId | int      | The ID of the document to be deleted                         |

### Returned value

| **Type** | **Description**                                               |
| -------- | ------------------------------------------------------------- |
| bool     | A flag which show whether the operation was successful or not |
