assets:write scope.
Upload a file
1
Start the upload
POST /v1/assets/upload-url with fileName, contentType and sizeBytes. Send durationSec, width and height when you know them: they are stored as declared, and tools that bill or limit by length read them. The response gives an assetId, an uploadUrl and the headers to send.2
PUT the bytes
PUT the file to uploadUrl with exactly the returned headers. A request without them is rejected by storage.3
Confirm
POST /v1/assets/{assetId}/confirm. Flowy verifies the file landed, runs moderation and marks the asset ready, then returns the asset. A confirm before the upload finished returns 409 with code set to upload_incomplete; a blocked file returns 422.413 with code set to too_large.
Import from URLs
POST /v1/assets/import-url fetches up to 8 public https URLs server-side and stores each as an asset. Pass projectId to attach them to a project. Failures are reported per item, so one bad URL does not fail the others.
Read the result with Get an asset.