v1

latestOpenAPI 3.1.02026-07-241630614.2 KB

Edit a file

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

patch/v1.0/files/{file_uuid}

Path parameters

file_uuidstring required

File UUID

Request body

namestring

New name of the file. DON'T PASS version_uuid IF YOU PASS THIS PARAMETER.

version_uuidstring

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

created_atinteger
{"stackTrail":"paths:/v1.0/files/{file_uuid}:patch:responses:200:content:application/json:schema:properties:deleted_at","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/v1.0/files/{file_uuid}:patch:responses:200:content:application/json:schema:properties:deleted_by","oasType":"schema","type":"unknown"}
has_multiple_versionsboolean
is_trashedboolean
namestring
{"stackTrail":"paths:/v1.0/files/{file_uuid}:patch:responses:200:content:application/json:schema:properties:previews","oasType":"schema","type":"unknown"}
sanitized_namestring
session_idinteger
sizeinteger
{"stackTrail":"paths:/v1.0/files/{file_uuid}:patch:responses:200:content:application/json:schema:properties:source_id","oasType":"schema","type":"unknown"}
typestring
updated_atinteger
uuidstring
version_uuidstring

Example response

{
  "_links": {
    "download": {
      "href": "https://drive-c.kommo.com/download/aff5603a-28b1-4c17-8e98-16e473b323b3/367b9f38-5f01-4cea-947e-dfab47aea522/picture.png"
    },
    "download_version": {
      "href": "https://drive-c.kommo.com/download/aff5603a-28b1-4c17-8e98-16e473b323b3/367b9f38-5f01-4cea-947e-dfab47aea522/43de3be7-307b-4766-a23e-5e88211b9a8d/picture.png"
    },
    "self": {
      "href": "https://drive-c.kommo.com/v1.0/files/367b9f38-5f01-4cea-947e-dfab47aea522"
    }
  },
  "created_at": 1671687247,
  "created_by": {
    "type": "internal",
    "id": 7758337
  },
  "metadata": {
    "extension": "png",
    "mime_type": "image/png"
  },
  "name": "product",
  "sanitized_name": "product",
  "session_id": 26136001,
  "size": 7526,
  "type": "file",
  "updated_at": 1671687247,
  "updated_by": {
    "type": "internal",
    "id": 7758337
  },
  "uuid": "367b9f38-5f01-4cea-947e-dfab47aea522",
  "version_uuid": "43de3be7-307b-4766-a23e-5e88211b9a8d"
}