Files
Upload cover images for links and invoices
Create a file upload URL
Returns a short-lived URL to PUT the file straight to storage. The bytes never pass through this API.
Three steps:
POST /files/upload-urlwith the purpose, name, MIME type and exact byte length.PUTthe bytes toupload_urlwithContent-TypeandContent-Lengthset to the values you declared.- Pass
file_urlascover_image_url(or insideimage_urls) when you create the payment link or invoice.
Declare the length honestly. content_type and content_length are signed into the URL, so storage rejects a body of any other type or size — that is what enforces the cap once we are no longer in a position to measure it.
purpose picks the limits. It selects the storage location, the size cap and the MIME allowlist; a raw directory is never accepted, which is what keeps this endpoint away from unrelated areas such as KYB documents.
The URL expires (5 minutes by default). An expired URL is not an error you can retry on — ask for a new one.
Create a file upload URL › Request Body
purposeWhat the file will be used for. Determines size and type limits.
file_nameOriginal file name, used only for its extension
content_typeMIME type. Must match the Content-Type you PUT, or the signature is invalid.
content_lengthExact byte length. Signed into the URL, so storage rejects a body of any other size — this is what enforces the cap once the bytes no longer pass through us.
expires_in_secondsSeconds the upload URL stays valid. Defaults to 300.

