---
title: "Finish a resumable folder upload and unpack it into the workspace [write]"
method: POST
path: "/sessions/{id}/workspace/imports/{upload_id}/complete"
---

# Finish a resumable folder upload and unpack it into the workspace \[write\]

`POST /sessions/{id}/workspace/imports/{upload_id}/complete`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/sessions/{id}/workspace/imports/{upload_id}/complete`
- Auth: HTTP bearer

Checks the parts' total size and sha256 against the declaration, then has the pod pull and unpack the folder in the background, exactly as /workspace/import would; poll the upload until its state is imported or failed. Calling it again is safe. 202 while importing. 409 parts_missing, 422 size_mismatch or checksum_mismatch, 409 import_unsupported when the session's runtime predates resumable imports (use /workspace/import).

## Path parameters

- `id` string, required
- `upload_id` string, required

## Response `200`

OK

- object
  - `id` string
  - `name` string
  - `size` integer
  - `sha256` string
  - `part_size` integer
  - `parts` integer: how many parts the upload has
  - `received` integer[]: part numbers already stored
  - `state` 'uploading' | 'verified' | 'importing' | 'imported' | 'failed'
  - `path` string: where the folder landed, once imported
  - `files` integer: files unpacked, once imported
  - `error` object
    - `code` string
    - `message` string

## Other responses

- `202`: Importing
- `default`: Error — { error: { code, message, request_id } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/sessions/:id/workspace/imports/:upload_id/complete/post.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/0d435187cd55?raw)
