> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aigenda.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Завершить загрузку

> Сообщает AiGenda, что все части файла загружены в хранилище.

## Параметры пути

<ParamField path="space_id" type="integer" required>
  Идентификатор пространства.
</ParamField>

<ParamField path="audio_id" type="integer" required>
  Идентификатор записи.
</ParamField>

## Тело запроса

<ParamField body="parts" type="object[]" required>
  Части файла по порядку загрузки.

  <Expandable title="поля элемента">
    <ParamField body="PartNumber" type="integer" required>
      Номер части, с единицы.
    </ParamField>

    <ParamField body="ETag" type="string" required>
      Заголовок `ETag` из ответа хранилища, вместе с двойными кавычками.
    </ParamField>
  </Expandable>
</ParamField>

## Ответ

Успешный ответ: `200` с пустым телом.

После ответа дождитесь `is_uploaded: true` в [Статус загрузки](/api-reference/audio/info).

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.aigenda.tech/api/spaces/1024/audio/51234/complete_upload/" \
    -H "Authorization: Bearer <access>" \
    -H "Content-Type: application/json" \
    -d '{
      "parts": [
        {
          "PartNumber": 1,
          "ETag": "\"9b2cf535f27731c974343645a3985328\""
        }
      ]
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.aigenda.tech/api/spaces/1024/audio/51234/complete_upload/",
      headers={"Authorization": "Bearer <access>"},
      json={
          "parts": [
              {
                  "PartNumber": 1,
                  "ETag": "\"9b2cf535f27731c974343645a3985328\"",
              },
          ],
      },
      timeout=30,
  )
  response.raise_for_status()
  print(response.status_code)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.aigenda.tech/api/spaces/1024/audio/51234/complete_upload/", {
    method: "POST",
    headers: { Authorization: "Bearer <access>", "Content-Type": "application/json" },
    body: JSON.stringify({
      "parts": [
        {
          "PartNumber": 1,
          "ETag": "\"9b2cf535f27731c974343645a3985328\""
        }
      ]
    }),
  });
  console.log(response.status);
  ```
</RequestExample>

<ResponseExample>
  ```text 200 theme={null}
  Пустое тело ответа
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.