Upload files to a folder
POST/api/v2/files
Stores the files in a folder of the account's drive and processes them in the
background, as POST /api/v1/upload does. Poll GET /api/v2/files/uploads/{request_id}
for each file's file_id.
on_conflict for a name the folder already has: rename (default) adds a UTC date
suffix and the renamed_due_to_duplicate warning; replace replaces the existing file
(the new file gets a new id); fail answers 409 file_exists and stores nothing.
An unknown folder returns 404, /data/shared 403, and a full account 400
document_limit_exceeded.
Request
Responses
- 202
- 400
- 401
- 403
- 404
- 409
Upload accepted
Invalid request, or document_limit_exceeded: the account's file limit is reached.
Missing or invalid API key
Response Headers
Version of the gaius-api-contracts release the backend runs (legalgpt-contracts), sent on every response. Clients compare it with the @legalgpt/contracts version they were built with; both packages share one version per contract.
Prevents storage of sensitive authenticated chat data.
Language selected for outgoing generic tool-status labels and known HTTP/timeline error text. HTTP reason-phrase titles remain language-neutral.
Authenticated, but the API key's account has no access to this resource
Response Headers
Version of the gaius-api-contracts release the backend runs (legalgpt-contracts), sent on every response. Clients compare it with the @legalgpt/contracts version they were built with; both packages share one version per contract.
Prevents storage of sensitive authenticated chat data.
Language selected for outgoing generic tool-status labels and known HTTP/timeline error text. HTTP reason-phrase titles remain language-neutral.
Resource does not exist or is not visible to the caller
Response Headers
Version of the gaius-api-contracts release the backend runs (legalgpt-contracts), sent on every response. Clients compare it with the @legalgpt/contracts version they were built with; both packages share one version per contract.
Prevents storage of sensitive authenticated chat data.
Language selected for outgoing generic tool-status labels and known HTTP/timeline error text. HTTP reason-phrase titles remain language-neutral.
file_exists: the target name is taken. folder_busy: an upload is still being processed into the folder. vault_locked: the encrypted storage is locked.