---
title: "Confirm Upload"
method: POST
path: "/api/v1/files/{file_id}/confirm"
tags: ["files"]
---

# Confirm Upload

`POST /api/v1/files/{file_id}/confirm`

## Request

- Base URL: `https://memory.kagura-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://memory.kagura-ai.com/api/v1/files/{file_id}/confirm`
- Auth: none declared

Verify the upload landed in R2 and finalize the row.

Idempotent: confirming an already-uploaded file with a matching
sha256 returns the existing row unchanged.

## Path parameters

- `file_id` string, uuid, required

## Query parameters

- `workspace_id` string, uuid, required: Owning workspace

## Headers

- `authorization` string, nullable

## Request body

- FileConfirmRequest: Body for ``POST /api/v1/files/{file_id}/confirm``.
  - `sha256` string, required

## Response `200`

Successful Response

- FileObjectOut: Subset of ``FileObject`` exposed to clients. ``from_attributes=True`` lets us pass the ORM row directly to ``model_validate`` — no per-field copy needed.
  - `id` unknown, required
  - `workspace_id` unknown, required
  - `context_id` unknown
  - `filename` unknown, required
  - `content_type` unknown, required
  - `size_bytes` unknown, required
  - `sha256` unknown, required
  - `status` unknown, required
  - `created_at` unknown, required
  - `uploaded_at` unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud.md) · [All operations](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/revisions/09f17f5ada29?raw)
