Files

Request files from a person

Makes an upload request: up to 10 files (max_files), 95 MiB each (max_file_bytes), 250 MiB in all, optionally restricted to accept types. It lapses 10 minutes after it is made unless the person confirms. There is no link to hand around and no secret: the person opens upload_page_url in the Elaichi app, must be signed in as the account that made the request, chooses the files (each uploads in the background and can be removed again) and presses Confirm, which is their approval to hand the files over. Only confirmed files exist as files; until then a tool naming one is refused file_pending. Bounded per person: at most 20 requests open at once (429 too_many_open_uploads) and 100 made per hour (429 too_many_upload_requests, counted on requests made, so deleting files does not reset it). Audited as file.upload_requested. A backend that needs a file of its own, with no person involved, uses POST /file instead.

post/file/upload-request

Request

  • Base URL: https://api.elaichi.ai
  • URL: https://api.elaichi.ai/file/upload-request
  • Auth: HTTP bearer

Headers

X-Organization-Idstring

Target organization (org_…). Required for cookie/session auth on org-scoped routes; optional for API tokens, which carry their organization, and rejected when it names a different one.

Request body

purposestring required

A short sentence the person reads on the page.

max_filesinteger
acceptstring[]
max_file_bytesinteger

Response

Created

request_idstring

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.

purposestring

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

requesterstring

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

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

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.

upload_page_urlstring

The Elaichi app page where the person confirms. Carries no secret: only the signed-in person who made the request can use it.

Changes

No recorded changes to this operation across all 1 revision of this API.