---
updatedAt: 2025-06-08T14:11:51.000Z
agentTools:
  projectIndex: https://developers.kommo.com/llms.txt
---

# Get a version of file

A method that allows you to get file versions.

**Not sure what your drive name is?**

Read a [short article](https://kommo.readme.io/reference/your-drive) to find out.

**Limitations**\
This method is available to integrations with **Access to files** scope.

**Data type header when the request is successful/ in case of an error**\
Content-Type: application/json

## Response parameters

<HTMLBlock>{`
<table class="term_table">
<thead>
<tr>
<th>Parameter</th>
<th>Data type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>uuid</td>
<td>string</td>
<td>UUID of a file version</td>
</tr>
<tr>
<td>file_uuid</td>
<td>string</td>
<td>File UUID</td>
</tr>
<tr>
<td>type</td>
<td>string</td>
<td>File version type. Possible parameters– image, video, audio, document, file</td>
</tr>
<tr>
<td>name</td>
<td>string</td>
<td>File version name</td>
</tr>
<tr>
<td>sanitized_name</td>
<td>string</td>
<td>File version name in ASCII encoding</td>
</tr>
<tr>
<td>size</td>
<td>int</td>
<td>File version size in bytes</td>
</tr>
<tr>
<td>is_main</td>
<td>bool</td>
<td>This version is the active version of the file.</td>
</tr>
<tr>
<td>source_id</td>
<td>int|null</td>
<td>ID of the source the file version came from</td>
</tr>
<tr>
<td>created_at</td>
<td>int</td>
<td>Unix Timestamp file version creation time</td>
</tr>
<tr>
<td>created_by</td>
<td>object</td>
<td>ID of a user added the file version</td>
</tr>
<tr>
<td>created_by[id]</td>
<td>int</td>
<td>ID of the user who added the file version</td>
</tr>
<tr>
<td>created_by[type]</td>
<td>string</td>
<td>Type of user who added the file version</td>
</tr>
<tr>
<td>updated_at</td>
<td>int</td>
<td>Time when the file version was last updated (Unix Timestamp)</td>
</tr>
<tr>
<td>updated_by</td>
<td>object</td>
<td>ID of the user who updated the file version</td>
</tr>
<tr>
<td>metadata</td>
<td>object|null</td>
<td>File metadata</td>
</tr>
<tr>
<td>metadata[extension]</td>
<td>string</td>
<td>File extention</td>
</tr>
<tr>
<td>metadata[mime_type]</td>
<td>string</td>
<td>File MIME-type</td>
</tr>
<tr>
<td>previews</td>
<td>array|null</td>
<td>Array of previews for the file</td>
</tr>
<tr>
<td>previews[0]</td>
<td>object</td>
<td>File preview</td>
</tr>
<tr>
<td>previews[0][download_link]</td>
<td>string</td>
<td>URL to download preview</td>
</tr>
<tr>
<td>previews[0][width]</td>
<td>int</td>
<td>Preview width</td>
</tr>
<tr>
<td>previews[0][height]</td>
<td>int</td>
<td>Preview height</td>
</tr>
</tbody>
</table>
`}</HTMLBlock>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "files-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{your-drive}.kommo.com",
      "variables": {
        "your-drive": {
          "default": "your-drive"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {}
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1.0/files/{file_uuid}/versions": {
      "get": {
        "summary": "Get a version of file",
        "description": "A method that allows you to get file versions.",
        "operationId": "get-version",
        "parameters": [
          {
            "name": "file_uuid",
            "in": "path",
            "description": "File UUID",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Request header",
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Successful request": {
                    "value": "{\n  \"_count\": 2,\n  \"_embedded\": {\n    \"versions\": [\n      {\n        \"_links\": {\n          \"download\": {\n            \"href\": \"https://drive-c.kommo.com/download/21c0e773-0b10-57ac-96d1-c0b97ba6a3f7/89a61e7b-ba30-476f-b2f6-705a964e85c6/fd8401e1-c1db-4033-851c-1df68d40f579/source.jpeg\"\n          },\n          \"self\": {\n            \"href\": \"https://drive-c.kommo.com/v1.0/files/89a61e7b-ba30-476f-b2f6-705a964e85c6/versions/fd8401e1-c1db-4033-851c-1df68d40f579\"\n          }\n        },\n        \"created_at\": 1671995440,\n        \"created_by\": { \"type\": \"internal\", \"id\": 7758337 },\n        \"file_uuid\": \"89a61e7b-ba30-476f-b2f6-705a964e85c6\",\n        \"is_main\": true,\n        \"metadata\": { \"extension\": \"jpeg\", \"mime_type\": \"image/jpeg\" },\n        \"name\": \"source\",\n        \"previews\": null,\n        \"sanitized_name\": \"source\",\n        \"size\": 93425,\n        \"source_id\": null,\n        \"type\": \"image\",\n        \"updated_at\": 1671995440,\n        \"updated_by\": { \"type\": \"internal\", \"id\": 7758337 },\n        \"uuid\": \"fd8401e1-c1db-4033-851c-1df68d40f579\"\n      },\n      {\n        \"_links\": {\n          \"download\": {\n            \"href\": \"https://drive-c.kommo.com/download/21c0e773-0b10-57ac-96d1-c0b97ba6a3f7/89a61e7b-ba30-476f-b2f6-705a964e85c6/17006a5b-aa43-4b2f-a380-e851786b9a57/consoleText.txt\"\n          },\n          \"self\": {\n            \"href\": \"https://drive-c.kommo.com/v1.0/files/89a61e7b-ba30-476f-b2f6-705a964e85c6/versions/17006a5b-aa43-4b2f-a380-e851786b9a57\"\n          }\n        },\n        \"created_at\": 1663233556,\n        \"created_by\": { \"type\": \"internal\", \"id\": 7758337 },\n        \"file_uuid\": \"89a61e7b-ba30-476f-b2f6-705a964e85c6\",\n        \"is_main\": false,\n        \"metadata\": { \"extension\": \"txt\", \"mime_type\": \"\" },\n        \"name\": \"consoleText\",\n        \"previews\": null,\n        \"sanitized_name\": \"consoleText\",\n        \"size\": 7347,\n        \"source_id\": null,\n        \"type\": \"file\",\n        \"updated_at\": 1670599185,\n        \"updated_by\": { \"type\": \"internal\", \"id\": 7758337 },\n        \"uuid\": \"17006a5b-aa43-4b2f-a380-e851786b9a57\"\n      }\n    ]\n  },\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://drive-c.kommo.com/v1.0/files/89a61e7b-ba30-476f-b2f6-705a964e85c6/versions\"\n    }\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "_count": {
                      "type": "integer",
                      "example": 2,
                      "default": 0
                    },
                    "_embedded": {
                      "type": "object",
                      "properties": {
                        "versions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "_links": {
                                "type": "object",
                                "properties": {
                                  "download": {
                                    "type": "object",
                                    "properties": {
                                      "href": {
                                        "type": "string",
                                        "example": "https://drive-c.kommo.com/download/21c0e773-0b10-57ac-96d1-c0b97ba6a3f7/89a61e7b-ba30-476f-b2f6-705a964e85c6/fd8401e1-c1db-4033-851c-1df68d40f579/source.jpeg"
                                      }
                                    }
                                  },
                                  "self": {
                                    "type": "object",
                                    "properties": {
                                      "href": {
                                        "type": "string",
                                        "example": "https://drive-c.kommo.com/v1.0/files/89a61e7b-ba30-476f-b2f6-705a964e85c6/versions/fd8401e1-c1db-4033-851c-1df68d40f579"
                                      }
                                    }
                                  }
                                }
                              },
                              "created_at": {
                                "type": "integer",
                                "example": 1671995440,
                                "default": 0
                              },
                              "created_by": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "example": "internal"
                                  },
                                  "id": {
                                    "type": "integer",
                                    "example": 7758337,
                                    "default": 0
                                  }
                                }
                              },
                              "file_uuid": {
                                "type": "string",
                                "example": "89a61e7b-ba30-476f-b2f6-705a964e85c6"
                              },
                              "is_main": {
                                "type": "boolean",
                                "example": true,
                                "default": true
                              },
                              "metadata": {
                                "type": "object",
                                "properties": {
                                  "extension": {
                                    "type": "string",
                                    "example": "jpeg"
                                  },
                                  "mime_type": {
                                    "type": "string",
                                    "example": "image/jpeg"
                                  }
                                }
                              },
                              "name": {
                                "type": "string",
                                "example": "source"
                              },
                              "previews": {},
                              "sanitized_name": {
                                "type": "string",
                                "example": "source"
                              },
                              "size": {
                                "type": "integer",
                                "example": 93425,
                                "default": 0
                              },
                              "source_id": {},
                              "type": {
                                "type": "string",
                                "example": "image"
                              },
                              "updated_at": {
                                "type": "integer",
                                "example": 1671995440,
                                "default": 0
                              },
                              "updated_by": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "example": "internal"
                                  },
                                  "id": {
                                    "type": "integer",
                                    "example": 7758337,
                                    "default": 0
                                  }
                                }
                              },
                              "uuid": {
                                "type": "string",
                                "example": "fd8401e1-c1db-4033-851c-1df68d40f579"
                              }
                            }
                          }
                        }
                      }
                    },
                    "_links": {
                      "type": "object",
                      "properties": {
                        "self": {
                          "type": "object",
                          "properties": {
                            "href": {
                              "type": "string",
                              "example": "https://drive-c.kommo.com/v1.0/files/89a61e7b-ba30-476f-b2f6-705a964e85c6/versions"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Incorrect data transmitted": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "text/plain": {
                "examples": {
                  "Authorization failed": {
                    "value": ""
                  }
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "text/plain": {
                "examples": {
                  "Not enough rights to call this method": {
                    "value": ""
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "text/plain": {
                "examples": {
                  "File wasn't found": {
                    "value": ""
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```