Create media upload URL
Create a short-lived URL to upload a local file into a business's MEDIA library.
USE THIS when the file is on a device or sandbox disk and has no public URL (media already on the web goes through upload_media_from_url instead). PUT the raw bytes to the returned upload_url (see instructions for the exact curl command); the PUT response is the created media asset, whose original_url feeds create_post and the rest of the API. From a hosted Claude client, run the curl in the code-execution sandbox — the user's chat attachment is on its disk.
PREFER letting Marky FETCH the image over pushing it: if the image has any URL (a generated-image output URL, a web image, a host-provided download URL), skip this tool and use upload_media_from_url or pass the URL to create_post in media_urls — Marky downloads it server-side, so it works even when your sandbox blocks outbound network. Only use this PUT flow when the image is local-only AND your runtime can make outbound web requests. On ChatGPT, prefer upload_media_from_reference (ChatGPT fills the file automatically and Marky fetches it server-side, so the sandbox never makes the outbound upload). If the PUT fails with a connection error, your sandbox is blocking egress: don't retry — fall back to a URL Marky can fetch, or tell the user the image couldn't be attached (don't post media_urls: null).
The URL expires after 1 hour and is bound to this business. Re-PUTting the same bytes safely returns the original asset; different bytes on the same URL are rejected.
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. 429 rate_limit_exceeded: You sent too many requests this minute.
Request
- Base URL: https://api.mymarky.ai
- URL: https://api.mymarky.ai/api/media/uploads
- Auth: HTTP bearer
Headers
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.
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.