v4

latestOpenAPI 3.1.02026-08-0143190206.8 KB
v1

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`.

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

Path parameters

file_idstring required

The file's id.

Request body

expires_afterinteger nullable

Seconds from now until the public URL expires. Must be between 3600 (1 hour) and 2592000 (30 days). Omit to inherit the file's expiry (if it has one) or to make the URL valid indefinitely.

Response

Success

expires_atinteger nullable

Unix timestamp (seconds) when the public URL expires. Present when the public URL has an expiry, either from an explicit expires_after in the request or inherited from the file's TTL. Absent when the public URL is valid indefinitely.

public_urlstring required

The full public URL.