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

# Get file

> One file as it is now: read it until its status is ready or error.

Returns one [file object](https://docs.verbeo.ai/api-reference/knowledge-bases/overview.md#the-file-object). After an upload, read it until `status` is `ready` (searchable) or `error` (`error_code` and `error_message` say why). While it is `processing`, `chunks_saved` of `chunk_count` is how far it has got.

## Path parameters

**fileId** `string` *required*

UUID of the file.

## Request

```bash cURL theme={null}
curl "https://api.verbeo.ai/v1/knowledge-base/files/c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```python Python theme={null}
import os, time, requests

file_id = "c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0"
headers = {"Authorization": f"Bearer {os.environ['VERBEO_API_KEY']}"}
while True:
    file = requests.get(f"https://api.verbeo.ai/v1/knowledge-base/files/{file_id}", headers=headers).json()["data"]
    if file["status"] in ("ready", "error"):
        break
    time.sleep(5)
```

## Response

`200 OK`

```json theme={null}
{
  "success": true,
  "data": {
    "id": "c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0",
    "store_id": "5df09066-0842-4c92-8ef0-6cf2ff6d7455",
    "display_name": "prices.pdf",
    "file_type": "application/pdf",
    "file_size": 371989,
    "status": "ready",
    "error_code": null,
    "error_message": null,
    "chunk_count": 12,
    "chunks_saved": 12,
    "text_chars": 9575,
    "warnings": [],
    "…": "every field of the file object"
  }
}
```

## Errors

| Code | Status | When |
| - | - | - |
| `NOT_FOUND` | 404 | No such file, or it belongs to another workspace: `File not found`. |
| `VALIDATION_FAILED` | 422 | `fileId` is not a UUID. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.