for AI agents & developers
Let your agent run your social media
Post2Viral ships an MCP server and a REST API. Any agent — Claude Code, Codex, or your own — can schedule posts, list channels, generate images, and check analytics. This page is written for humans and agents: if you are an AI agent reading this, everything you need is below.
1. The one-prompt quickstart
Get your API key at app.post2viral.com → Settings → Public API, then paste this into your agent:
Use Post2Viral to post 3 posts a day on my Threads account @yourhandle.
MCP endpoint: https://app.post2viral.com/api/mcp/<YOUR_API_KEY>
If MCP is unavailable, use the REST API at
https://app.post2viral.com/api/public/v1 with header "Authorization: <YOUR_API_KEY>". 2. MCP server
Streamable-HTTP MCP endpoint, authenticated by your API key in the URL:
https://app.post2viral.com/api/mcp/<YOUR_API_KEY> Add it to Claude Code:
claude mcp add --transport http post2viral \
https://app.post2viral.com/api/mcp/<YOUR_API_KEY> Or to Codex (~/.codex/config.toml):
[mcp_servers.post2viral]
url = "https://app.post2viral.com/api/mcp/<YOUR_API_KEY>" MCP tools include: list channels, schedule posts (text + images), generate images, and web search for content research.
3. REST API
Base URL https://app.post2viral.com/api/public/v1
— send your API key in the Authorization header (no "Bearer" prefix).
List your channels
curl https://app.post2viral.com/api/public/v1/integrations \
-H "Authorization: <YOUR_API_KEY>"
# → [{ "id": "cmrd6b4...", "name": "post2viral",
# "identifier": "threads", "profile": "post2viral", ... }] Schedule a post
curl -X POST https://app.post2viral.com/api/public/v1/posts \
-H "Authorization: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"type": "schedule", // or "now" | "draft"
"shortLink": false,
"date": "2026-08-01T13:00:00.000Z", // UTC ISO 8601
"tags": [],
"posts": [{
"integration": { "id": "<CHANNEL_ID>" },
"value": [{ "content": "Your post text", "image": [] }]
}]
}'
# → [{ "postId": "cmre...", "integration": "<CHANNEL_ID>" }]
Threads posts: each extra item in value becomes a reply in a thread.
Upload media first via POST /upload (multipart) or
POST /upload-from-url.
More endpoints
GET /posts?display=week&day=…— list scheduled/published postsDELETE /posts/:id— delete a postGET /is-connected— check the key worksPOST /generate-video,POST /video/function— AI media (plan-gated)
4. Good to know
- Your API key acts as your account — treat it like a password and rotate it in Settings if exposed.
- Publishing capacity, AI usage, and channel counts follow your plan; requests are rate-limited.
- Posts publish through the official Meta APIs from a Meta tech provider — no scraping, no session cookies.
- Machine-readable summary of this site: /llms.txt