Upload File

Upload files directly to Elept's secure object storage. The upload size limit is dictated by your workspace subscription tier (single-request multipart POST is capped at 128 MB; for larger files up to 10 GB, use Chunked Uploads). Note that OPTIONS / CORS preflight is not supported; API requests must be performed server-to-server.

HTTP Endpoint

POST /api/v1/files
Authorization: Bearer YOUR_API_KEY
Content-Type: multipart/form-data

Request Parameters (Form Data)

Field Type Required Description
file binary Yes The raw binary file upload stream.
visibility string No private (default) or public.
display_name string No Custom label for dashboard display (defaults to uploaded filename).
branch_id int No ID of the client branch to route this upload to.
branch_slug string No Slug of the client branch (alternative to branch_id).
room_id int / string No Optional collection room ID or token to associate the uploaded file with.

Success Response (HTTP 201 Created)

{
  "success": true,
  "url": "https://elept.com/f/file_abc123.pdf",
  "pub2_url": null,
  "cdn_url": null,
  "public_url": null,
  "file": {
    "file_uid": "file_abc123",
    "branch_id": 2,
    "branch_slug": "acme",
    "display_name": "user_contract.pdf",
    "original_filename": "contract.pdf",
    "mime_type": "application/pdf",
    "extension": "pdf",
    "size_bytes": 248000,
    "visibility": "private",
    "is_public": 0,
    "object_key": "f/file_abc123.pdf",
    "gateway_url": "https://elept.com/f/file_abc123.pdf",
    "public_url": null,
    "checksum_sha256": "a34c9e8...",
    "created_at": "2026-06-16 01:24:20"
  }
}

Code Examples

PHP cURL Request:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://elept.com/api/v1/files");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer YOUR_API_KEY"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    'file' => new CURLFile('/path/to/contract.pdf'),
    'visibility' => 'private'
]);

$response = curl_exec($ch);
curl_close($ch);
Next: Import from URL API