# Classifying a document

> curl example for submitting a document classification POST request to the Document Understanding API using the project ID from the Discovery Service.

## Start classifying a document

:::tip
The Project ID is obtained from the response received from the [Get project information](https://docs.uipath.com/document-understanding/automation-suite/2.2610/api-guide/use-the-discovery-service) call.
:::

```
curl -X 'POST' \
  'https://{fqdn}/<Organization_Name>/<Tenant_Name>/du_/api/framework/projects/<Project_ID>/classifiers/ml-classification/classification?api-version=1' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer <your-access-token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "documentId": "25a03e48-cfe8-ed11-9f75-000d3a4964af"
}'
```

## Response of classifying a document

```
{
  "classificationResults": [
    {
      "documentTypeId": "invoices",
      "documentId": "25a03e48-cfe8-ed11-9f75-000d3a4964af",
      "confidence": 0.6170391,
      "ocrConfidence": -1,
      "reference": {
        "textStartIndex": 0,
        "textLength": 0,
        "tokens": []
      },
      "documentBounds": {
        "pageRange": "1",
        "pageCount": 1
      },
      "classifierName": "ML Classification (Preview)"
    }
  ]
}
```

:::note
This example shows an **API v1** response, which uses camelCase property names. API v2 returns PascalCase property names on all routes. For details, check [Migrating automations from Document Understanding API v1 to v2](https://docs.uipath.com/document-understanding/automation-suite/2.2610/api-guide/migrating-integrations-from-document-understanding-api-v1-to-v2).
:::

## Document bounds

The `documentBounds` object identifies the pages of the input file that a classification result applies to.

| Property | Type | Description |
| --- | --- | --- |
| `pageRange` | string | The pages covered by the result, numbered from 1. A single page appears as `"3"` and a range as `"1-3"`. When a classifier splits a file into multiple documents, each result has its own range. |
| `pageCount` | integer | The number of pages in `pageRange`. |

:::note
The `startPage`, `textStartIndex`, and `textLength` properties are deprecated. Responses still include them for backward compatibility, but their values do not reflect the page range of a split document. `pageRange` and `pageCount` replace them.
:::
