Import File from URL
Inbound file streaming from external URLs. Elept queues an asynchronous background ingestion job to download the remote asset server-side, validate MIME-type and size constraints, transfer the file to object storage, and register metadata.
HTTP Endpoint
POST /api/v1/files/from-url Authorization: Bearer YOUR_API_KEY Content-Type: application/json
Request Parameters (JSON Body)
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The absolute HTTP/HTTPS URL of the remote file to import. |
| delete_source_after_import | boolean | No | For supported external services (such as Twilio), delete the source asset after successful ingestion. |
Success Response (HTTP 202 Accepted)
{
"success": true,
"job": {
"id": 1042,
"status": "pending",
"source_url": "https://external-domain.com/invoices/inv_2026.pdf",
"message": "Ingestion job queued. Background worker will process it shortly."
}
}
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",
delete_source_after_import: false
})
})
.then(res => res.json())
.then(data => console.log(data));