Uploads
Presign a media upload
Validate scope/type/size + target ownership and return a short-lived presigned PUT URL plus the eventual CDN URL. The `accountAvatar` and `accountBanner` scopes additionally require the admin role.
Which media slot is being uploaded; resolves to a server-owned key prefix.
The exact Content-Type the client will PUT (signed into the URL).
Byte size of the file; checked against the scope cap.
The owning entity id (publishedAppId for appImage).
Presigned PUT URL — the client uploads the bytes directly here.
Server-issued object key; pass it back verbatim to commit.
The CDN URL the object will be delivered from after commit.
When the presigned upload URL expires.
curl https://api.koo.io/accounts/:accountId/uploads/presign \ -X POST \ -H "Authorization: Bearer kc_your_api_token" \ -H "Content-Type: application/json" \ -d '{ "scope": "accountAvatar", "contentType": "example", "sizeBytes": 0, "sha256": "example" }'{ "uploadUrl": "https://example.com", "key": "example", "finalUrl": "https://example.com", "expiresAt": "2026-01-01T00:00:00.000Z"}Commit a media upload
HEAD-verify the uploaded object and write its CDN URL onto the target entity. Rejects any key outside the requester’s scope. The `accountAvatar` and `accountBanner` scopes additionally require the admin role.
The key returned by presign.
Which media slot is being uploaded; resolves to a server-owned key prefix.
The committed CDN URL written to the entity.
curl https://api.koo.io/accounts/:accountId/uploads/commit \ -X POST \ -H "Authorization: Bearer kc_your_api_token" \ -H "Content-Type: application/json" \ -d '{ "key": "example", "scope": "accountAvatar" }'{ "finalUrl": "https://example.com"}