Uploads one or more files that you are going to encrypt, and returns their ids for Create an encrypted area's file_ref.
Any file type is accepted — an archive, a video, a key file, a file whose type your browser could not determine. That is the difference between this endpoint and the general file upload, which accepts documents, images and text only: the general upload reads and indexes what you send it, so it has to understand the format. A file uploaded here is encrypted rather than read, so there is nothing to understand.
Nothing uploaded here is indexed, searchable, or used as assistant context. It exists to be sealed.
Requires authentication (bearer token or API key), membership of the organization, and the permission to create files. Send multipart/form-data.
Encrypted areas are part of Conversations. Where Conversations is switched off for your account this endpoint answers 403, exactly as the create endpoint does — there is no arbitrary-file upload surface without the feature.
| Limit | Value |
|---|---|
| Files per request | 10 |
| Size per file | 100 MB |
| Request body | 1 GB (10 files plus multipart overhead) |
A file you intend to send as a secure link has a lower effective ceiling of 32 MB — that limit belongs to the seal, not to this upload, so an oversized file uploads here and is refused with 413 when you create the area. See Create an encrypted area.
organization_id string required
The organization the files belong to. You must be an active member of it.
files file[] required
One to ten files, as multipart/form-data parts. Each part's declared content type is stored as given when it is a valid media type, and recorded as application/octet-stream otherwise — so a file your browser could not classify still uploads. The filename is stored for display and travels inside the sealed area when you encrypt the file; it is never used as a storage path.
The same envelope as the general file upload, so one client parser serves both:
success—truewhen every file stored.message— a short human-readable summary.files— the created file records; takeidforfile_ref.total_uploaded,total_failed.errors— one entry per failed file (filename,error,mime_type,code,file_size_bytes), ornull.erroris written to be shown to a person — render it.
Status codes: 201 (all stored), 207 (some stored, some failed — read errors), 422 (all failed for a non-size reason), 413 (all failed because they were too large, or the request body exceeded the batch limit).
curl -X POST "https://api.aitronos.com/v1/organizations/org_123/files/encrypted-area-upload" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-F "files=@./secrets.zip" \
-F "files=@./id_rsa"{
"success": true,
"message": "Successfully uploaded 1 file(s)",
"files": [
{
"id": "file_9f2c1d7a4b3e4f0a8c5d6e7f80912345",
"original_filename": "secrets.zip",
"mime_type": "application/zip",
"file_size": 20480,
"organization_id": "org_123"
}
],
"total_uploaded": 1,
"total_failed": 0,
"errors": null
}