Upload File
Upload files directly to Elept's secure object storage. The upload size limit is dictated by your workspace subscription tier.
HTTP Endpoint
POST /api/v1/files 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. |
| storage_class | string | No | hot (default), public, archive, or backup. |
| 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). |
| folder | string | No | Virtual folder key for organization. |
| metadata | json | No | Optional JSON string of custom key-value pairs. |
Success Response
{
"success": true,
"file": {
"file_uid": "file_abc123",
"branch_id": 2,
"branch_slug": "acme",
"display_name": "user_contract.pdf",
"original_filename": "contract.pdf",
"mime_type": "application/pdf",
"size_bytes": 248000,
"visibility": "private",
"gateway_url": "https://elept.com/f/file_abc123",
"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',
'storage_class' => 'hot'
]);
$response = curl_exec($ch);