Files

Copy a public URL into FilePost

Download a public http or https URL and store it as a permanent FilePost file. This endpoint requires an API key from a verified account. It rejects private or reserved network destinations, revalidates every redirect, allows only ports 80 and 443, and applies the account's normal upload, file-size, storage, and rate limits.

post/v1/upload/url

Request

  • Base URL: https://filepost.dev (the document declares no server; this is the origin it was published from)
  • URL: https://filepost.dev/v1/upload/url
  • Auth: none declared

Headers

X-API-Keystring nullable

Request body

urlstring required

Public http or https URL to download and store in FilePost.

filenamestring nullable

Optional stored filename. Defaults to the final source URL path.

content_typestring nullable

Optional MIME type override. Defaults to the source response Content-Type.

expires_instring nullable

Optional auto-delete period, such as 30s, 24h, or 7d.

filename_mode'download' | 'public' nullable

Override the account default. 'download' keeps the filename out of the public URL; 'public' includes it.

Example request

{
  "expires_in": "7d",
  "filename": "invoice.pdf",
  "filename_mode": "download",
  "url": "https://example.com/reports/invoice.pdf"
}

Response

Successful Response

file_idstring required

Stable FilePost file ID.

urlstring required

Public CDN URL. Anyone with this URL can view/download the file without a FilePost account.

namestring required

Original filename.

sizeinteger required

Decoded file size in bytes.

content_typestring required

Stored MIME type.

expires_atstring nullable

UTC expiry timestamp when the file is temporary; otherwise null.

provisionalboolean

True when email verification is required before the file becomes permanent.

filename_mode'download' | 'public' required

Effective filename visibility mode used for this upload.

Example response

{
  "content_type": "application/pdf",
  "expires_at": "2026-06-24T12:30:00",
  "file_id": "abc123def456",
  "filename_mode": "public",
  "name": "report.pdf",
  "provisional": false,
  "size": 10485760,
  "url": "https://cdn.filepost.dev/file/filepost/uploads/ab/abc123def456/report.pdf"
}

Changes

No recorded changes to this operation across all 1 revision of this API.