Skip to main content
POST
Mint a download URL for a file

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

sailbox_id
string
required

Id of the Sailbox, as returned by create. It is sb_ followed by a UUID.

Body

application/json
path
string
required

Absolute path of the file inside the Sailbox. The file is read when the URL is fetched, so it does not have to exist when the URL is minted.

Minimum string length: 1
expires_in_seconds
integer<int64>
default:3600

How long the URL stays valid, up to seven days. Expiry only stops new fetches; copies already downloaded or cached are unaffected.

Required range: 1 <= x <= 604800
attachment
boolean
default:false

Serve the file as a download (Content-Disposition: attachment) instead of inline.

immutable
boolean
default:false

Mark the response cacheable for a year, so a cache that holds a copy never checks back. Use it only for a path you never overwrite.

Response

The URL and when it stops working.

url
string<uri>
required

The signed URL. Anyone who holds it can read this one file until it expires.

expires_at
string<date-time>
required

When the URL stops working.