Temporary File URL

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
temporary file URLexpires_atretention windowAI jobscleanup
Expiry shape
Input
multipart file plus visibility
Output
url, file_id, delete_url, expires_at
Use for
OCR, AI, social publishing, reports, CRM imports
Short answer

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
API pattern

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.

01

Create the URL

Send `POST /v1/files` as multipart form data with a `file` field and `visibility=public`.

02

Track the lifetime

Store `expires_at` beside the workflow job so delayed fetches and retries can check the URL window.

03

Clean up early

Use `file_id` or the returned `delete_url` after the destination confirms it fetched the file.

Expiry playbook

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.

01

Fast server fetch

For OCR, AI, and webhook steps that fetch immediately, keep enough time for retries and one delayed retry branch.

02

Async import

For CRM, CMS, social, and bulk import jobs, compare the returned `expires_at` with the destination's later fetch timing.

03

Human review

If a person approves the next step, use a workspace retention policy that matches that review window.

04

No request expiry field

The public upload request uses `file` and `visibility`; read `expires_at` from the response instead of sending `expires_in`.

URL model

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.

01

Temporary public URL

Use this when an OCR, AI, webhook, social, or import API must fetch the file without your app's auth session.

02

Signed URL

Use this when access should stay tokenized for a trusted user or private system, and the destination can use that signed link.

03

Storage presigned URL

Use S3 or R2 presigned URLs when your team already owns buckets, IAM, CORS, delivery behavior, and cleanup.

Use case

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.

01

AI workflows

Host generated images, PDFs, and other outputs long enough for model, vision, or processing APIs to fetch them.

02

Document processing

Give OCR or extraction services a reachable URL, then let the file expire after the processing window.

03

Automation handoffs

Pass a file from n8n, Make, Zapier, or Pipedream into another API without long-lived public exposure.

Controls

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.

01

expires_at

Read the exact expiry time from the response and log it alongside the workflow job.

02

retention policy

Use the default retention window that matches your workspace policy and workflow risk.

03

delete early

Use the returned file ID to remove access before expiry when the downstream job completes.

Troubleshooting

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.

01

Expired before fetch

Adjust workspace retention if the destination API fetches the URL asynchronously.

02

Retries need time

Give error handling and retry branches enough time to reuse the URL.

03

Sensitive files

Use the shortest useful expiry and delete as soon as processing is done.

Examples

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'
FAQ

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.