---
title: "Confirm an upload request"
method: POST
path: "/file/upload-request/{id}/confirm"
tags: ["Files"]
---

# Confirm an upload request

`POST /file/upload-request/{id}/confirm`

## Request

- Base URL: `https://api.elaichi.ai`
- URL: `https://api.elaichi.ai/file/upload-request/{id}/confirm`
- Auth: HTTP bearer

Confirms an upload request. The person’s explicit approval: the staged files become their files (origin `request`, kept 7 days) in one atomic step, and from then a tool may name them. Idempotent: confirming a confirmed request returns the same files and writes nothing. `409` `uploads_in_progress` while a file is still uploading, `no_files_staged` when nothing was added, `upload_request_closed` once it has expired. Audited as `file.upload_confirmed` (count and names) and one `file.uploaded` per file.

## Path parameters

- `id` string, required

## Headers

- `X-Organization-Id` string

## Request body

- object
  - `file_ids` string[], required: EXACTLY the staged files the person was shown. Any difference from what the server holds is `409` `upload_changed` and nothing is committed.

## Response `200`

OK

- object
  - `request_id` string: Request id (`fupr_…`).
  - `status` 'open' | 'confirmed' | 'expired': `open`: waiting for the person (files may be added, removed, confirmed). `confirmed`: they approved; the staged files are now theirs. `expired`: the deadline passed unconfirmed with nothing still uploading. A request whose upload STARTED before the deadline stays open until that upload finishes, and each finished file keeps it open for at least five more minutes, so someone mid-upload is never told it expired.
  - `purpose` string: What the files are for, as the asker said it.
  - `requester` string: Who is asking: the connected app’s name, or “Elaichi assistant”.
  - `limits` object
    - `max_files` integer: Files at most. 10.
    - `max_file_bytes` integer: The most one file may be. 95 MiB, or the request’s lower setting.
    - `max_total_bytes` integer: The most the whole request may hold. 250 MiB.
    - `accept` string[], nullable: Allowed media types (`image/*`, `application/pdf`) and extensions (`.csv`); null means anything.
  - `created_at` string, date-time
  - `add_files_until` string, date-time: Ten minutes after creation, fixed. No new file can be reserved after it; the person can still send the files they added.
  - `expires_at` string, date-time: The last moment the person can confirm (Send). Starts at `add_files_until`; it moves out when an upload finishes or an upload that was running ends without landing, never past 35 minutes after creation.
  - `upload_page_url` string: The Elaichi app page where the person confirms. Carries no secret: only the signed-in person who made the request can use it.
  - `files` object[]: At most `limits.max_files`.
    - `file_id` string
    - `filename` string
    - `size_bytes` integer, nullable
    - `mime` string, nullable
    - `state` 'uploading' | 'staged' | 'ready' | 'stalled'

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `429`: Rate limited

---

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