Files

Upload a file and get a public URL

Upload a file with multipart/form-data. Authenticate with X-API-Key. The response includes a public CDN URL that does not require a FilePost account to open. Add optional form field expires_in, such as 30s, 24h, or 7d, to auto-delete the file later. Set filename_mode to download or public to override the account default for this upload.

post/v1/upload

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
  • Auth: none declared

Headers

X-API-Keystring nullable

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.