Import File from URL
Inbound file streaming from external URLs. Elept downloads the remote asset server-side, validates the mime-type and size bounds, transfers it to the cloud provider, and records metadata.
HTTP Endpoint
POST /api/v1/files/from-url Content-Type: application/json
Request Parameters (JSON Body)
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The absolute HTTP/HTTPS URL of the file to import. |
| filename | string | No | Override the original file name. If empty, it's parsed from the URL path. |
| visibility | string | No | private (default) or public. |
| storage_class | string | No | hot (default), public, archive, or backup. |
| delete_source_after_import | boolean | No | For supported APIs (like Twilio), delete the source file after successful import. |
| metadata | object | No | Key-value pairs to store with file metadata. |
Code Examples
JavaScript Fetch:
fetch('https://elept.com/api/v1/files/from-url', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: "https://external-domain.com/invoices/inv_2026.pdf",
filename: "inv_2026.pdf",
visibility: "private"
})
})
.then(res => res.json())
.then(data => console.log(data));