Create temporary file URLs that expire after the workflow
The next API needs the file now, not forever. Upload the file with `visibility=public`, read the returned `expires_at`, and keep the file ID or delete URL ready for cleanup.
- Reviewed by
- GetFileURL technical team
- Updated
- Input
- multipart file plus visibility
- Output
- url, file_id, delete_url, expires_at
- Use for
- OCR, AI, social publishing, reports, CRM imports
What this page answers
It is a public file URL with a defined retention window. The file is reachable while the workflow needs it and should stop resolving after expiry or deletion.
- Reviewed by
- GetFileURL technical team
- Last updated
Create, use, track, then clean up the temporary URL.
The current upload API takes the file and delivery visibility. The response carries the lifecycle fields your workflow should store.
Create the URL
Send `POST /v1/files` as multipart form data with a `file` field and `visibility=public`.
Track the lifetime
Store `expires_at` beside the workflow job so delayed fetches and retries can check the URL window.
Clean up early
Use `file_id` or the returned `delete_url` after the destination confirms it fetched the file.
Choose a retention window around the real fetch, not the first upload.
Temporary file URL APIs are useful because downstream tools fetch from their own servers. The URL must stay alive through queue delay, retries, and async processing.
Fast server fetch
For OCR, AI, and webhook steps that fetch immediately, keep enough time for retries and one delayed retry branch.
Async import
For CRM, CMS, social, and bulk import jobs, compare the returned `expires_at` with the destination's later fetch timing.
Human review
If a person approves the next step, use a workspace retention policy that matches that review window.
No request expiry field
The public upload request uses `file` and `visibility`; read `expires_at` from the response instead of sending `expires_in`.
Temporary public URLs and signed URLs solve different jobs.
Both can have an expiry, but the handoff is different. Use the model that matches how the downstream system will fetch the file.
Temporary public URL
Use this when an OCR, AI, webhook, social, or import API must fetch the file without your app's auth session.
Signed URL
Use this when access should stay tokenized for a trusted user or private system, and the destination can use that signed link.
Storage presigned URL
Use S3 or R2 presigned URLs when your team already owns buckets, IAM, CORS, delivery behavior, and cleanup.
Temporary URLs match files that only exist for a job.
Generated files, invoices, screenshots, and attachments often need public access for minutes or days, not permanent hosting.
AI workflows
Host generated images, PDFs, and other outputs long enough for model, vision, or processing APIs to fetch them.
Document processing
Give OCR or extraction services a reachable URL, then let the file expire after the processing window.
Automation handoffs
Pass a file from n8n, Make, Zapier, or Pipedream into another API without long-lived public exposure.
Expiry should be explicit, visible, and easy to debug.
The upload response should expose the expiry so workflow logs and downstream steps know how long the URL remains usable.
expires_at
Read the exact expiry time from the response and log it alongside the workflow job.
retention policy
Use the default retention window that matches your workspace policy and workflow risk.
delete early
Use the returned file ID to remove access before expiry when the downstream job completes.
Use a retention window that survives real workflow delays.
Queues, retries, external API delays, and social publishing fetches can happen after the first workflow step succeeds.
Expired before fetch
Adjust workspace retention if the destination API fetches the URL asynchronously.
Retries need time
Give error handling and retry branches enough time to reuse the URL.
Sensitive files
Use the shortest useful expiry and delete as soon as processing is done.
Copy the same upload shape into code
curl -X POST https://api.getfileurl.com/v1/files \
-H 'Authorization: Bearer $GETFILEURL_KEY' \
-F 'file=@invoice.pdf' \
-F 'visibility=public'Common questions
What is a temporary file URL?
It is a public file URL with a defined retention window. The file is reachable while the workflow needs it and should stop resolving after expiry or deletion.
When should I use a temporary URL instead of a permanent URL?
Use temporary URLs for job-specific files such as generated images, OCR inputs, invoices, reports, and workflow attachments.
Is a temporary file URL the same as a signed URL?
No. A temporary public file URL is meant for a downstream API that needs a fetchable link. A signed URL is tokenized access for private delivery. Both still need expiry and cleanup planning.
Can I delete a temporary URL early?
Yes. Store the returned file ID and call the delete endpoint when the workflow no longer needs public access.
Do I send an expiry field when uploading?
No. The current upload API sends `file` and `visibility`; the response returns `expires_at` based on the workspace retention policy.