Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mymarky.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Coding agents can use the Marky API to create posts (caption + platforms), update them, and schedule publishing. Your agent or workflow supplies the copy; Marky handles delivery to the social accounts connected in the dashboard.

Claude Code example

Add this to your agent’s instructions or CLAUDE.md:
## Social media posting

To create and schedule social posts, use the Marky API:

1. List businesses: GET https://api.mymarky.ai/api/businesses
   - Header: Authorization: Bearer mk_live_YOUR_KEY

2. Create post: POST https://api.mymarky.ai/api/posts
   - Body: {"business_id": "YOUR_BIZ_ID", "caption": "Your post text", "publish_to": ["instagram", "linkedin"]}

3. Schedule: POST https://api.mymarky.ai/api/posts/{post_id}/schedule
   - Body: {"publish_at": "2026-04-15T14:00:00Z"}
Then ask your agent: “Create 3 social posts about our new product launch and schedule them for tomorrow at 2pm.”

Python script

import httpx
from datetime import datetime, timedelta, timezone

API_KEY = "mk_live_your_key_here"
BIZ_ID = "your-business-id"
BASE = "https://api.mymarky.ai/api"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1. Create a post
resp = httpx.post(f"{BASE}/posts", headers=HEADERS, json={
    "business_id": BIZ_ID,
    "caption": "Why consistent social posting matters for small businesses #SmallBusiness",
    "publish_to": ["instagram", "linkedin"],
})
post = resp.json()

# 2. Schedule it
publish_time = datetime.now(timezone.utc) + timedelta(days=1)
httpx.post(f"{BASE}/posts/{post['id']}/schedule", headers=HEADERS, json={
    "publish_at": publish_time.isoformat(),
})

cURL example

# Create a post
POST_ID=$(curl -s -X POST https://api.mymarky.ai/api/posts \
  -H "Authorization: Bearer mk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"business_id":"YOUR_BIZ_ID","caption":"Spring sale announcement!","publish_to":["facebook","instagram"]}' \
  | jq -r '.id')

# Schedule it
curl -s -X POST https://api.mymarky.ai/api/posts/$POST_ID/schedule \
  -H "Authorization: Bearer mk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"publish_at":"2026-04-15T14:00:00Z"}'

Rate limits

100 requests/minute per API key. An agent creating 5 posts and scheduling them uses ~10 requests, well within limits.

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/library/files as context, then reference it when creating posts.
  • Upload images first. Use POST /api/media to upload images, then attach them to files with POST /api/files/{id}/media.