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

# Complete Upload

> Finalize a multi-part upload

Finalizes a multi-part upload after all parts have been uploaded using the pre-signed URLs. You must provide the ETag returned by each part upload.

<ParamField query="staging_type" type="string" default="core">
  Staging bucket type: `core`, `instrument`, or `stream`
</ParamField>

<ParamField body="upload_id" type="string" required>
  The upload session ID from the get upload URLs response
</ParamField>

<ParamField body="new_filename" type="string" required>
  The server-assigned filename from the get upload URLs response
</ParamField>

<ParamField body="etag_data" type="array" required>
  Array of ETag data for each uploaded part

  <Expandable title="properties">
    <ParamField body="ETag" type="string" required>
      The ETag returned in the response headers when uploading each part
    </ParamField>

    <ParamField body="PartNumber" type="integer" required>
      The part number (starting from 1)
    </ParamField>
  </Expandable>
</ParamField>

## Response

Returns an empty object on success.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.atomscale.ai/data_entries/raw_data/staged/upload_urls/complete/" \
    -H "X-API-KEY: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "upload_id": "abc123",
      "new_filename": "staged_rheed_video.mp4",
      "etag_data": [
        {"ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"", "PartNumber": 1}
      ]
    }'
  ```

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

  response = requests.post(
      "https://api.atomscale.ai/data_entries/raw_data/staged/upload_urls/complete/",
      headers={
          "X-API-KEY": "YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "upload_id": "abc123",
          "new_filename": "staged_rheed_video.mp4",
          "etag_data": [
              {"ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"", "PartNumber": 1}
          ]
      }
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {}
  ```
</ResponseExample>
