Complete a direct multipart upload
Finalizes the multipart upload, verifies the stored object's size against what the session declared, and returns the resulting asset with its capability URL. Requires a workspace member with the `files:write` permission. A session that has expired, been aborted, or is completed with the wrong number of parts is rejected; completing a session that already finished returns the existing asset. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringsessionId*stringapplication/json- body
parts*array<>Success
application/json- response
data*curl -X POST 'https://api.snoze.dev/v1/workspaces/string/assets/uploads/string/complete' \ -H 'Content-Type: application/json' \ -d '{ "parts": [ { "partNumber": 0, "etag": "string" } ]}'{ "data": { "fileId": "string", "url": "string", "name": "string", "size": 0, "mimeType": "string" }}Begin a direct multipart upload session
Validates the declared name, MIME type, size, and per-part checksums, checks the workspace storage quota, opens a multipart upload against the object store, and returns the session with one presigned URL per part and an expiry. Requires a workspace member with the `files:write` permission. Refused when the storage backend does not support direct uploads, when the declared metadata or part layout is invalid, or when the workspace is over its storage quota. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.
Abort a direct multipart upload session
Claims the abort in the database before discarding the object store's multipart state, so it can never race a completion that has already begun, and returns the session id. Requires a workspace member with the `files:write` permission. Naturally idempotent: a session that is no longer uploading is left untouched.