> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.labric.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.labric.co/_mcp/server.

# Confirm an upload

POST https://platform.labric.co/api/v1/files/{file_id}/confirm-upload

Finish an upload after the PUT to its upload URL has succeeded.

Records the stored file's size and checksum, makes the file visible in
listings, and notifies triggers and parsers. Files over 500 MB and native
executables are discarded with a 400, as the one-request upload rejects
them. Confirming a file that is already confirmed returns its record again
without notifying anyone twice. The
[Upload files](https://docs.labric.co/upload-files) guide shows the full
sequence.

Requires an API key with the `write` scope.

Reference: https://docs.labric.co/api-reference/labric-api/files/confirm-upload

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `file_id` (string, required)

## Response

### 200

OK

- `file_id` (string, required) — The ID of the uploaded file.
- `file_name` (string, required) — The original file name.
- `size_kilobytes` (integer, required, nullable) — File size in kilobytes.

## Errors

### 400 Bad Request Error

Bad Request

- `detail` (string, required)

### 401 Unauthorized Error

Unauthorized

- `detail` (string, required)

### 403 Forbidden Error

Forbidden

- `detail` (string, required)

### 404 Not Found Error

Not Found

- `detail` (string, required)

### 422 Unprocessable Entity Error

Unprocessable Content

- `detail` (list of map from string to any, required)

### 500 Internal Server Error

Internal Server Error

- `detail` (string, required)

## Examples

**Response**

```json
{
  "file_id": "f3a9b2d7-8c4e-4a1f-9b2d-7e8c4e1f9b2d",
  "file_name": "tensile_batch_42.csv",
  "size_kilobytes": 2048
}
```

**SDK Code**

```python
from labric import Labric

client = Labric(
    api_key="YOUR_TOKEN_HERE",
)

client.files.confirm_upload(
    file_id="f3a9b2d7-8c4e-4a1f-9b2d-7e8c4e1f9b2d",
)

```