---
title: "Create a file upload session"
method: POST
path: "/v1.0/sessions"
---

# Create a file upload session

`POST /v1.0/sessions`

The method allows you to create a session to upload a file or version of a file. If the method is used to upload a new version of a file, then the uploaded version will automatically become the active version of the file. The request must be sent to the file service host.

## Headers

- `Content-Type` string

## Request body

- object
  - `file_name` string, required — Name of the uploaded file
  - `file_size` integer, required — Size of the uploaded file (in bytes)
  - `file_uuid` string — The UUID of the file the new version of the file is being uploaded for. If UUID is not specified, a new file will be created.
  - `content_type` string — MIME type of file
  - `with_preview` boolean — When this flag is set, a preview will be generated for the file.

## Response `200`

200

- object
  - `max_file_size` integer
  - `max_part_size` integer
  - `session_id` integer
  - `upload_url` string

## Other responses

- `400` — 400
- `401` — 401
- `403` — 403

---

[API](https://skmtc.net/kommo/apis/kommo-api-references.md) · [All operations](https://skmtc.net/kommo/apis/kommo-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kommo/kommo-api-references/revisions/f17af4d23c7c/schema)
