# Confirm an upload finished and queue it for indexing

Source: https://docs.usetone.ai/reference/knowledge/confirmUpload

> Phase two.

`POST /v1/knowledge-bases/{id}/documents/{documentId}/confirm`
Phase two. Nothing is trusted until here: the object is re-read and its real size and type checked against what you declared. Indexing is asynchronous — wait for `knowledge.build.completed` rather than polling.

Requires the `write` scope.

## Parameters

| Name | In | | Meaning |
|---|---|---|---|
| `id` | path | required | The knowledge base's id. |
| `documentId` | path | required | The document's id. |

## Response

| Field | Type | | Meaning |
|---|---|---|---|
| `byteSize` | integer | required | The document size in bytes, as measured on our side after upload. |
| `charCount` | integer | required | Characters extracted. 0 until the document has been parsed. |
| `createdAt` | string | required | When the document was added. RFC 3339, UTC. |
| `error` | string | null | required | Why parsing failed. Null unless `status` is failed. |
| `filename` | string | required | The document file name. |
| `id` | string | required | The knowledge document's unique id. |
| `kind` | string | required | What kind of source this is. Open set — handle an unrecognised value rather than throwing. Today: `pdf`, `docx`, `txt`, `csv`, `md`, `url`. |
| `mimeType` | string | required | The document content type. |
| `status` | string | required | Where this document is in ingestion. Open set — handle an unrecognised value rather than throwing. Today: `awaiting_upload`, `queued`, `processing`, `ready`, `failed`. |
| `updatedAt` | string | required | When the document last changed — including a re-parse. RFC 3339, UTC. |

### Example response

```json
{
  "data": {
    "byteSize": 0,
    "charCount": 0,
    "createdAt": "2026-08-25T09:14:22Z",
    "error": null,
    "filename": "returns-policy.pdf",
    "id": "9f1c2d84-4e3a-4f6c-b902-7d1e8a33c451",
    "kind": "pdf",
    "mimeType": "application/pdf",
    "status": "awaiting_upload",
    "updatedAt": "2026-08-25T09:14:22Z"
  }
}
```
