Upload media
Upload a binary image or video file into a business’s MEDIA library.
Use this for actual image/video bytes (multipart upload). To create a
markdown/text document instead, use create_library_file. The returned
media asset can be attached to a document via attach_media_to_file and
used in post generation.
Send an Idempotency-Key header to make a retry safe (a resend of the same
file returns the original media asset instead of uploading a duplicate).
Supported formats: JPEG, PNG, WebP, GIF, MP4, MOV. Images are automatically optimized. Max file size: 50 MB.
Errors: 400 invalid_value: The business_id is not a valid UUID. 401 authentication_required: API key or token is missing, invalid, or revoked. 403 permission_denied: Your plan does not include API access, or this business is not in your org. 404 resource_not_found: No business with that ID exists. 413 FILE_TOO_LARGE: The uploaded file is larger than 50 MB. 422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different file. 429 rate_limit_exceeded: You sent too many requests this minute.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional. Send a unique value (e.g. a UUID) to make this create request safe to retry. A repeat with the same key returns the original response instead of creating a duplicate. Cached for 24h, scoped to your org. Reusing a key with a different body returns 422.
Path Parameters
A UUID identifier.
Query Parameters
Alt text for the media
Body
Image or video file
Response
Successful Response
Media ID
Business this media belongs to
When the media was uploaded
Alt text description
Media URL
Media type: image, video, or audio
Width in pixels
Height in pixels
Media origin (e.g. upload, unsplash)
