---
title: "Finish a zip archive's multipart transfer and start processing"
method: POST
path: "/v1/imports/{id}/complete-transfer"
tags: ["Imports"]
---

# Finish a zip archive's multipart transfer and start processing

`POST /v1/imports/{id}/complete-transfer`

## Request

- Base URL: `https://api.memestack.ai`
- URL: `https://api.memestack.ai/v1/imports/{id}/complete-transfer`
- Auth: HTTP bearer

Owner only. Assembles the uploaded parts, re-validates the assembled object's actual size against MAX_ARCHIVE_BYTES, then validates the ZIP central directory via ranged R2 reads (no full-file load) and checks the entry count is between 1 and MAX_IMPORT_ENTRIES. On success, transitions the import to queued and enqueues the first processing chunk. Any validation failure here also moves the import to a terminal `failed` status with `last_error` set.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `parts` object[], required
    - `n` integer, required
    - `etag` string, required

## Response `200`

Archive validated and processing started.

- object
  - `total_entries` integer

## Other responses

- `400`: parts missing/empty/malformed, assembled object over MAX_ARCHIVE_BYTES, corrupt/unparseable archive (INVALID_ARCHIVE), or entry count outside [1, MAX_IMPORT_ENTRIES].
- `404`: Import not found, or caller is not the owner.
- `409`: Import is not in awaiting_transfer or transferring status.

---

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