Files API

Public URLs

See the Public URLs guide for expiry behaviour, idempotency, and end-to-end examples.


Create a public URL

/v1/files/{file_id}/public-url

Create a permanent, unauthenticated public URL for an existing file. The underlying file is unaffected and can still be fetched through the authenticated content endpoint. Use this when you want to share a stored asset (image, video, PDF) outside your API-keyed environment. Public URLs can be revoked at any time via POST /v1/files/{file_id}/public-url/revoke.

Path parameters

file_id

string

required

The file's `id`.

Request Body

Response Body

public_url

string

The full public URL.


Revoke a public URL

/v1/files/{file_id}/public-url/revoke

Revoke the active public URL for a file. The underlying file remains available through the authenticated content endpoint. Revoke is idempotent — calling it on a file without an active public URL returns revoked: false without an error.

Path parameters

file_id

string

required

The file's `id`.

Response Body

id

string

The file ID whose public URL was revoked.

revoked

boolean

Whether a public URL was actually revoked. false if the file had no active public URL (no-op).


Last updated: September 2, 2026