Skip to content
POST /file/upload-request/{id}/confirm

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

idstring
required·

Request id (fupr_…).

Request Body

file_idsstring[]

EXACTLY the staged files the person was shown. Any difference from what the server holds is 409 upload_changed and nothing is committed.

Response Body

add_files_untilstring · date-time

Ten minutes after creation, fixed. No new file can be reserved after it; the person can still send the files they added.

created_atstring · date-time
expires_atstring · 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.

filesobject[]

At most limits.max_files.

file_idstring
filenamestring
mimestring,null
size_bytesinteger,null
statestring
Possible values:
uploadingstagedreadystalled
limitsobject
acceptarray,null

Allowed media types (image/*, application/pdf) and extensions (.csv); null means anything.

max_file_bytesinteger

The most one file may be. 95 MiB, or the request’s lower setting.

max_filesinteger

Files at most. 10.

max_total_bytesinteger

The most the whole request may hold. 250 MiB.

purposestring

What the files are for, as the asker said it.

request_idstring

Request id (fupr_…).

requesterstring

Who is asking: the connected app’s name, or “Elaichi assistant”.

statusstring

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.

Possible values:
openconfirmedexpired
upload_page_urlstring

The console page. Carries no secret: only the signed-in person who made the request can use it.

curl -X POST 'https://api.elaichi.ai/file/upload-request/<id>/confirm' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"file_ids":[]}'
const body = {
  "file_ids": []
};

const response = await fetch('https://api.elaichi.ai/file/upload-request/<id>/confirm', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import os
import requests

url = "https://api.elaichi.ai/file/upload-request/<id>/confirm"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "file_ids": []
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())