Overview
Coding agents can use the Marky API to generate on-brand posts, create posts, update them, and schedule publishing. Marky can write the copy and make the images for you (pulled from your business’s brand kit), or your agent can supply its own. Either way Marky handles delivery to the social accounts connected in the dashboard.Claude Code example
Add this to your agent’s instructions or CLAUDE.md:Python script
cURL example
Rate limits
Each API key can make:- 100 requests per minute
- 2,000 requests per day
- 10,000 requests per week
429 response with a Retry-After header
telling you how many seconds to wait. The X-RateLimit-* response headers show
how many requests you have left in the current window.
Tips
- Stagger scheduled times. Don’t schedule all posts at the same time. Space them out by 2-4 hours for better engagement.
-
Use the library. Push markdown content into
/api/businesses/{business_id}/library/filesas context, then reference it when creating posts. -
Attaching images — let Marky fetch the image, don’t push it. Every image ends up as
Marky-hosted media before it goes on a post. Pick the path that matches where the image is:
- The image already has a URL (best, works everywhere): pass that URL straight to
create_postinmedia_urls, or callupload_media_from_url. Marky downloads and stores it server-side — your runtime uploads nothing, so this works even in sandboxes that block outbound network. This covers generated images (e.g. an image-model output URL), web images, and anything you can reference by URL. - The file is on your disk/sandbox AND your runtime can make outbound web requests:
call
create_media_uploadfor a one-hourupload_url, thenPUTthe raw bytes to it (the response’sinstructionsfield has the exact curl). ThePUTruns from your runtime, so this only works if your sandbox allows outbound HTTP. - A local file in a sandbox that blocks outbound network (many hosted agents do):
you can’t
PUT. Prefer path 1 with a URL your host can hand you. If the image only exists as local bytes with no URL and no egress, it cannot be attached via the API — tell the user instead of scheduling a post withmedia_urls: null.
PUTupload when your runtime has real outbound network. - The image already has a URL (best, works everywhere): pass that URL straight to
