---
metadata:
  - name: generator
    content: Diplodoc Platform v5.70.0
alternate:
  - https://yandex.ru/support/wiki/en/api-ref/upload_sessions/upload_sessions__upload_part.md
  - https://yandex.ru/support/wiki/ru/api-ref/upload_sessions/upload_sessions__upload_part.md
  - href: https://yandex.ru/support/wiki/en/api-ref/upload_sessions/upload_sessions__upload_part.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/support/wiki/en/llms.txt?revision=r22094953
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/support/wiki/en/llms.txt?revision=r22094953

<div class="openapi">

# Upload Part

<!-- markdownlint-disable-file -->

Uploads file data to the session that you created.

- Use `Content-Type: application/octet-stream` and send the data in the request body.
- When uploading to S3, send parts with the `part_number` parameter, starting with `1`. You can
  upload parts in parallel and retry failed uploads. Service settings limit the part size.
- When using the file upload service, send the entire file in one request. Its size
  must match the size that you specified when creating the session.

For common headers and authentication methods, see [Access to the API](https://yandex.ru/support/wiki/en/api-ref/access.md#headers). For sample scenarios, see [API usage examples](https://yandex.ru/support/wiki/en/api-ref/examples.md).

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-put);margin-bottom: 12px">

<div class="openapi__request">

PUT {.openapi__method}
```text translate=no
https://api.wiki.yandex.net/v1/upload_sessions/{session_id}/upload_part
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_session_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;uuid4&gt;

Upload session ID in UUID format. Pass the `session_id` field value from the response to `POST /v1/upload_sessions`.

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
|#{.json-schema-properties}

### Query parameters

#|
|| **Name** | **Description** ||
||

_part_number_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Number of the file part to upload, from `1` to `10000`. When uploading the entire file, specify `1`. For multipart uploads, number the parts sequentially, starting with `1`.

_Min value:_{.json-schema-reset .json-schema-assertion} `1`

_Max value:_{.json-schema-reset .json-schema-assertion} `10000`
{.table-cell}
||
|#{.json-schema-properties}

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "session_id": "example",
  "file_name": "example",
  "file_size": 0,
  "status": "not_started",
  "user": {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  },
  "created_at": "2025-01-01T00:00:00Z",
  "finished_at": "2025-01-01T00:00:00Z",
  "storage_type": "mds"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_created_at_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Date and time when the upload session was created.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_file_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

The name of the file to upload.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_file_size_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

File size in bytes, as specified when the session was created.
{.table-cell}
||
||

_session_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;uuid4&gt;

File upload session ID in UUID format. Use this value as `session_id` in methods for uploading, completing, and aborting a session.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **UploadSessionStatusType**

  **Type**: [UploadSessionStatusType](#entity-UploadSessionStatusType)

  An enumeration.

  _Enum:_{.json-schema-reset .json-schema-value} `not_started`, `in_progress`, `finished`, `aborted`, `used`, `cleanup`

{% endcut %}

Upload session state.

_Example:_{.json-schema-reset .json-schema-example} `not_started`
{.table-cell}
||
||

_user_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **UserSchema**

  **Type**: [UserSchema](#entity-UserSchema)

  User information

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  }
  ```

  {% endcut %}

{% endcut %}

User who created the upload session.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}
```

{% endcut %}
{.table-cell}
||
||

_finished_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

The date and time when the upload finished. null if the upload has not finished yet.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_storage_type_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **StorageType**

  **Type**: [StorageType](#entity-StorageType)

  An enumeration.

  _Enum:_{.json-schema-reset .json-schema-value} `mds`, `s3`, `custom_s3`

{% endcut %}

File storage type.

_Example:_{.json-schema-reset .json-schema-example} `mds`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### UploadSessionStatusType {#entity-UploadSessionStatusType}

An enumeration.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `not_started`, `in_progress`, `finished`, `aborted`, `used`, `cleanup`

</div>

<div class="openapi-entity">

### UserIdentity {#entity-UserIdentity}

User identifier

#|
|| **Name** | **Description** ||
||

_cloud_uid_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

User identifier in the cloud

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_uid_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Yandex user ID

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "uid": "example",
  "cloud_uid": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### UserSchema {#entity-UserSchema}

User information

#|
|| **Name** | **Description** ||
||

_affiliation_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

User affiliation

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_display_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

User display name

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Internal user identifier
{.table-cell}
||
||

_is_dismissed_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean

The user is dismissed
{.table-cell}
||
||

_username_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

User login

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_identity_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **UserIdentity**

  **Type**: [UserIdentity](#entity-UserIdentity)

  User identifier

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "uid": "example",
    "cloud_uid": "example"
  }
  ```

  {% endcut %}

{% endcut %}

User identifier in the system

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "uid": "example",
  "cloud_uid": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### StorageType {#entity-StorageType}

An enumeration.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `mds`, `s3`, `custom_s3`

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.