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 size: 20 MB for images, 500 MB for video.
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 the size limit (20 MB image / 500 MB video). 422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different file. 429 rate_limit_exceeded: You sent too many requests this minute.
Request
- Base URL: https://api.mymarky.ai
- URL: https://api.mymarky.ai/api/businesses/{business_id}/media
- Auth: HTTP bearer
Path parameters
A UUID identifier.
Query parameters
Optional hint about the media: an address, a name, anything the picture can't show. Stored as source_alt_text; alt_text is written by looking at the image itself shortly after upload.
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.
Opt into a dated API version. Omit to stay on the floor (2026-04-08) forever — unpinned clients never break. Pin to a newer date (e.g. 2026-08-06) to receive the newest response shapes. Unknown values fall back to the floor. See https://docs.mymarky.ai for the versioning model.
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.