Upload a file for a managed account
Uploads a post's media or a profile picture for a managed account, and gives back its file id. Name what it's for: accountId for a post on a delivered account (you must be able to post from it), or orderId for an unfinished setup or its first post (full admins and account owners). purpose: "post_video" (a video post's one video: MP4, MOV or WebM), "post_image" (carousel images: JPG, PNG or WebP), "story_image" (a story's one image), or "avatar" (a profile picture). Two ways to send the file. (a) Two steps: send contentType and sizeBytes (the exact byte count), PUT the raw bytes to the returned uploadUrl with the returned headers before expiresInSeconds runs out, then call the finalize operation named below. (b) One call: send url, a public https link to the file; Bloss downloads it (the link must report its size) and answers with the finished file (status: "ready"), so no PUT and no finalize are needed. Use (b) when the file is already online, (a) for a file you hold. Finalize: managed.uploads.finalize. Then use the file id in mediaFileIds (managed.account.post.create / .update, managed.order.first-post.media.replace), avatarFileId (managed.order.update) or pictureFileId (managed.account.review). A type or size the purpose doesn't take is validation_failed (details.code MEDIA_TYPE_UNSUPPORTED or MEDIA_TOO_LARGE). Uploads are limited per hour and in megabytes per day (429 rate_limited).
bearerAuth managed:writeAuthorizationBearer <token>Personal access token. Scopes: account:read, creator:read, creator:earnings, managed:read, coach:read, brand:read, creators:read, videos:read, analytics:read, onboarding:read, onboarding:signatures, engagement:read, support:read, integrations:read, payouts:read, funds:read, billing:read, groups:write, videos:write, onboarding:write, sync:write, payouts:write, campaigns:write, brand:write, creators:write, engagement:write, support:write, accounts:write, payments:write, creator:write, creator:payouts:write, managed:write, coach:write, agency:write.
Scope: managed:write
application/json- body
accountId?stringThe managed account a post's media is for.
1 <= lengthorderId?stringThe order (unfinished setup) a profile picture or first post file is for.
1 <= lengthpurpose*string"post_video", "post_image", "story_image" or "avatar".
"post_video""post_image""avatar""story_image"url?stringMode (b): a public https link to the file. Bloss downloads and finishes it in this call.
urilength <= 2000contentType?stringThe file's type (video/mp4, image/jpeg…). Required in mode (a); in mode (b), only when the link reports the wrong type.
1 <= length <= 120sizeBytes?integerMode (a): the file's exact size in bytes. The upload URL is signed for this size.
0 < value <= 9007199254740991fileName?stringThe file's name, for your own reference.
1 <= length <= 200Success.
application/json- response
status*string"awaiting_upload" (mode a: PUT the bytes, then finalize) or "ready" (mode b: the file is done).
"awaiting_upload""ready"uploadId*stringThe upload's id, which is also the file's id once finished.
uploadUrl?stringMode (a): PUT the file's bytes here.
method?stringheaders?Mode (a): send these headers with the PUT (its Content-Type).
expiresInSeconds?numberMode (a): how long the upload URL works.
file?The finished file, when status is "ready".
curl -X POST 'https://example.com/api/v1/managed/uploads' \ -H 'Content-Type: application/json' \ -d '{ "purpose": "post_video"}'{ "status": "awaiting_upload", "uploadId": "string", "uploadUrl": "string", "method": "PUT", "headers": { "property1": "string", "property2": "string" }, "expiresInSeconds": 0, "file": { "fileId": "string", "contentType": "string", "sizeBytes": 0, "previewUrl": "string" }}Fill in an unfinished setup PATCH
Saves setup details on an unfinished order: handle, displayName, bio, linkInBio (Instagram), niche, warmingTerms (the topics the account warms up on: 3, or 9 with the Standard upgrade), warmingTargetCount, and for a brand seat assignedUserId. Send only what changes. Check a handle first with POST /managed/orders/{orderId}/handle-check. A profile picture is `avatarFileId`: upload it first with managed.uploads.create (`orderId`, purpose avatar). Answers the order and `completeness` (what's still missing before checkout).
Finish a managed-account upload POST
Finishes a two-step upload from managed.uploads.create after you PUT the bytes: Bloss checks the stored file's real size and type against what you declared and answers the file, whose `fileId` (the same as the upload id) goes in `mediaFileIds`, `avatarFileId` or `pictureFileId`. Calling it again answers the same file. Bytes that never arrived, or an upload id that isn't yours or is over a day old, answer validation_failed (MEDIA_MISSING); a stored file that doesn't match what was declared is validation_failed too. Takes no body.