> ## 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.

# Complete upload

> Tells AiGenda that all file parts have been uploaded to storage.

## Path parameters

<ParamField path="space_id" type="integer" required>
  Space ID.
</ParamField>

<ParamField path="audio_id" type="integer" required>
  Recording ID.
</ParamField>

## Request body

<ParamField body="parts" type="object[]" required>
  File parts in upload order.

  <Expandable title="item fields">
    <ParamField body="PartNumber" type="integer" required>
      Part number, starting from one.
    </ParamField>

    <ParamField body="ETag" type="string" required>
      The `ETag` header from the storage response, together with its double quotes.
    </ParamField>
  </Expandable>
</ParamField>

## Response

Successful response: `200` with an empty body.

After the response, wait for `is_uploaded: true` in [Upload status](/en/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}
  Empty response body
  ```
</ResponseExample>


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