All functions

uploadAsset

Upload a file (image or PDF, max 10 MB) to cloud storage. Returns the storage key and a time-limited signed URL for reading. Optionally creates an Asset database record. When temp is true, the asset is scheduled for deletion after 24 hours.

POST/fx/files/upload-assetAPI docs

2 credits / day / MB

Use cases

User-generated content uploads

Store profile images, avatars, or user-uploaded PDFs. Use temp: true for previews that expire in 24h, or create persistent assets with metadata.

Temporary file sharing

Generate time-limited share links for documents. Upload with temp: true and pass the signed URL to recipients—files auto-delete after 24 hours.

Parameters

NameTypeDescription
organizationIdstringrequiredThe ID of the organization making the request
fileBase64stringrequiredThe file encoded as a base64 string
filenamestringrequiredOriginal filename including extension
contentTypestringrequiredMIME type (image/jpeg, image/png, image/gif, image/webp, application/pdf)
titlestringoptionalOptional display title for the asset record
tempbooleanoptionalIf true, the asset is scheduled for deletion after 24 hours. Defaults to false

Response

NameTypeDescription
keystringStorage key for the uploaded file
urlstringSigned URL for reading the file (valid for 1 hour)
assetobject | undefinedAsset database record, if title was provided or temp is true