---
title: "Finish a resumable upload into a file [write]"
method: POST
path: "/files/uploads/{upload_id}/complete"
tags: ["files"]
---

# Finish a resumable upload into a file \[write\]

`POST /files/uploads/{upload_id}/complete`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/files/uploads/{upload_id}/complete`
- Auth: HTTP bearer

Once every byte is in, answers the File; retrying answers the same File. 409 upload_incomplete while bytes are missing; 410 upload_expired once the session has lapsed. Large files can take a while to complete: allow a few minutes.

## Path parameters

- `upload_id` string, required

## Response `200`

OK

- File
  - `type` 'file', required
  - `id` string, required: file_…
  - `created_at` string, date-time, required
  - `filename` string, required
  - `mime_type` string, required
  - `size_bytes` integer, required
  - `downloadable` boolean, required: true for image uploads (readable within the workspace) and for the per-session copies minted when a file rides a message; false for other uploads (write-once)
  - `attach_by_default` boolean, required: Whether every new session in the workspace starts with a read-only copy under /workspace/shared/
  - `expires_at` string, date-time, nullable, required
  - `canonical` object: Optional reference for a currently readable canonical execution-generated meeting file. Ordinary uploads and older unprojected Recall files omit it. This is a discovery reference, not a permission grant: read GET /artifacts/{artifact_id} for current can_discuss and other authoritative controls before using existing private history/comments/policy/delete operations. Generated content remains read-only; no public sharing is implied.
    - `artifact_id` string, required
    - `origin` 'execution', required
    - `version` integer, required

## Other responses

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

## Changes

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

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/files/uploads/: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/8280a065ef6a?raw)
