---
title: "Edit a file"
method: PATCH
path: "/v1.0/files/{file_uuid}"
---

# Edit a file

`PATCH /v1.0/files/{file_uuid}`

## Request

- Base URL: `https://your-drive.kommo.com`
- URL: `https://your-drive.kommo.com/v1.0/files/{file_uuid}`
- Auth: OAuth 2

The method allows you to edit the file. When you edit a file, you can change its name or active version.

## Path parameters

- `file_uuid` string, required

## Request body

- object
  - `name` string: New name of the file. DON'T PASS version_uuid IF YOU PASS THIS PARAMETER.
  - `version_uuid` string: UUID of the file version that should be set as the active file version. DON'T PASS NAME PARAMETER IF YOU PASS THIS ONE.

## Response `200`

200

- object
  - `_links` object
    - `download` object
      - `href` string
    - `download_version` object
      - `href` string
    - `self` object
      - `href` string
  - `created_at` integer
  - `created_by` object
    - `type` string
    - `id` integer
  - `deleted_at` unknown
  - `deleted_by` unknown
  - `has_multiple_versions` boolean
  - `is_trashed` boolean
  - `metadata` object
    - `extension` string
    - `mime_type` string
  - `name` string
  - `previews` unknown
  - `sanitized_name` string
  - `session_id` integer
  - `size` integer
  - `source_id` unknown
  - `type` string
  - `updated_at` integer
  - `updated_by` object
    - `type` string
    - `id` integer
  - `uuid` string
  - `version_uuid` string

## Other responses

- `400`: 400
- `401`: 401
- `403`: 403

---

[API](https://skmtc.dev/kommo/apis/files-api.md) - [All operations](https://skmtc.dev/kommo/apis/files-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kommo/apis/files-api/revisions/61d4a8f2d8c9?raw)
