Skip to main content

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.
The easiest way to connect an agent is the MCP server — one URL and your agent gets Marky’s tools natively, no REST cheat-sheet to maintain. The REST examples below still work if you’d rather call the API directly.

Claude Code example

Add this to your agent’s instructions or CLAUDE.md:
Then ask your agent: “Create 3 social posts about our new product launch and schedule them for tomorrow at 2pm.”

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
An agent creating 5 posts and scheduling them uses ~10 requests, well within limits. If you hit a cap, you get a 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/files as 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:
    1. The image already has a URL (best, works everywhere): pass that URL straight to create_post in media_urls, or call upload_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.
    2. The file is on your disk/sandbox AND your runtime can make outbound web requests: call create_media_upload for a one-hour upload_url, then PUT the raw bytes to it (the response’s instructions field has the exact curl). The PUT runs from your runtime, so this only works if your sandbox allows outbound HTTP.
    3. 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 with media_urls: null.
    Rule of thumb: give Marky a URL and let the server pull it; only reach for the PUT upload when your runtime has real outbound network.