---
title: "Complete a multipart import upload"
method: POST
path: "/mailboxes/{id}/imports/files/{file_id}/complete"
tags: ["Mailboxes"]
---

# Complete a multipart import upload

`POST /mailboxes/{id}/imports/files/{file_id}/complete`

## Request

- Base URL: `https://shipmail.to/api/v1`
- URL: `https://shipmail.to/api/v1/mailboxes/{id}/imports/files/{file_id}/complete`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://shipmail.to/api/auth/oauth2/authorize`, token URL `https://shipmail.to/api/auth/oauth2/token`)

Complete the prepared multipart upload with every part number and the ETag returned by that part's PUT response. Shipmail verifies that the stored object matches the declared file size before staging it for import.

## Path parameters

- `id` string, required
- `file_id` string, required

## Headers

- `X-Shipmail-Organization` string

## Request body

- CompleteImportUploadRequest
  - `parts` object[], required
    - `part_number` integer, required
    - `etag` string, required: ETag response header returned by this part's PUT request.

## Response `204`

Upload completed and staged for import.

## Other responses

- `404`: Resource not found.
- `409`: Resource conflict.
- `422`: Validation failed.
- `429`: Rate limit exceeded.

---

[API](https://skmtc.dev/shipmail/apis/shipmail-api.md) · [All operations](https://skmtc.dev/shipmail/apis/shipmail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shipmail/apis/shipmail-api/revisions/2c23e59d7e30?raw)
