
# Files

Manage files on the Bitrix24 Drive: list, upload, download, rename, move, copy, and delete. Files are stored in folders inside storages.

Bitrix24 API: `disk.file.*`
Scope: `disk`

## Operations

- [List folder files](./files/list.md) — `GET /v1/files`
- [File search](./files/search.md) — `POST /v1/files/search`
- [Get file](./files/get.md) — `GET /v1/files/:id`
- [Rename file](./files/update.md) — `PATCH /v1/files/:id`
- [Delete file](./files/delete.md) — `DELETE /v1/files/:id`
- [File fields](./files/fields.md) — `GET /v1/files/fields`
- [Upload file](./files/upload.md) — `POST /v1/files/upload`
- [Download file](./files/download.md) — `GET /v1/files/:id/download`
- [Move file](./files/moveto.md) — `POST /v1/files/:id/moveto`
- [Copy file](./files/copyto.md) — `POST /v1/files/:id/copyto`

## Key fields

| Field | Description |
|------|---------|
| `id` | Numeric file identifier |
| `name` | File name with extension |
| `size` | File size in bytes. Returned for file records |
| `folderId` | Parent folder identifier (from [`GET /v1/folders`](/docs/entities/folders)) |
| `storageId` | Storage identifier (from [`GET /v1/storages`](/docs/entities/storages)) |
| `type` | Object type — always `"file"` for files |
| `downloadUrl` | Temporary download link. For programmatic download use [`GET /v1/files/:id/download`](./files/download.md) |
| `createdAt` | Creation date and time in ISO 8601 format |
| `updatedAt` | Date and time of the last change in ISO 8601 format |

Full field list — [`GET /v1/files/fields`](./files/fields.md).

## What to know before you start

1. **Listing files requires a `folderId`.** `GET /v1/files` returns the contents of a specific folder. To get a folder identifier, first request the storage list via `GET /v1/storages`, then the folder list via `GET /v1/folders` with the required `storageId`.
2. **`GET /v1/files` returns a mixed list.** The response contains both files (`type: "file"`) and subfolders (`type: "folder"`). Use the `type` field to filter by type.
3. **Deletion is soft.** `DELETE /v1/files/:id` marks the file as deleted; the file is not physically erased. A deleted file remains in Bitrix24 until final purge.
4. **Only the name can be changed.** `PATCH /v1/files/:id` accepts only the `name` field. Other fields are read-only.
5. **Move works only within a single storage.** `POST /v1/files/:id/moveto` does not move files between storages. To transfer between storages use `POST /v1/files/:id/copyto`, then `DELETE /v1/files/:id`.

## Typical scenario

1. Get the storage identifier: [`GET /v1/storages`](/docs/entities/storages).
2. Find the required folder: [`GET /v1/folders`](/docs/entities/folders) with the `storageId` parameter.
3. Upload a file to the folder: [`POST /v1/files/upload`](./files/upload.md) with `folderId` — the response returns the `id` of the new file.
4. Download the file contents: [`GET /v1/files/:id/download`](./files/download.md).

## Limits

| Limit | Value |
|-------|----------|
| Maximum records per request | 5000 (with `limit > 50` Vibecode runs several requests automatically, offset via `offset`) |
| Maximum upload file size | determined by Bitrix24 account settings |
| Batch requests | up to 50 operations in [`POST /v1/batch`](/docs/batch) |
| Rate limit | shared across the Vibe API — see [Limits and optimization](/docs/optimization) |

## See also

- [Folders](/docs/entities/folders)
- [Storages](/docs/entities/storages)
- [Filtering syntax](/docs/filtering)
- [API keys](/docs/keys-auth)
- [Error codes](/docs/errors)
