Get started
PostNinja developer docs
Schedule and publish posts to X, Instagram, Threads, Facebook, TikTok, YouTube and Pinterest from an AI agent over MCP, or from your own code with the REST API. Both run the same rules as the app, so a post they accept is a post that can go out.
Use these docs with your AI agent
Every page here is also plain Markdown. Paste /llms-full.txt (all pages in one file) or a page's Markdown into your agent, or just tell it:
Read https://postninja.app/llms-full.txt and set up PostNinja for me.What you can do
- Create posts for any mix of connected accounts: schedule them, publish now, save drafts, or drop them into the next free slot of your posting queue.
- Write per platform: one text for every platform, or a different version for each (a short X post, hashtags on Instagram).
- Use every format: photo and video uploads, X threads with their own photos, Instagram Stories, TikTok privacy and disclosure settings, YouTube titles and thumbnails, and first comments.
- Work as a team: profiles (one per client or brand) with their own brand voice, post templates, and approvals for members' posts.
- See results: analytics for a date range, an inbox of comments and Instagram and Facebook direct messages you can reply from, and webhooks that tell your systems when posts go out or fail.
Two ways in
| MCP server | REST API | |
|---|---|---|
| For | AI agents: Claude, ChatGPT, Cursor, Codex, Gemini, Grok and others | Your code, scripts and automation tools (n8n, Make, Zapier) |
| Address | https://postninja.app/api/mcp | https://postninja.app/api/v1 |
| Sign-in | Sign in with your account (OAuth), or an API key | An API key |
| Docs | Connect an agent, Tools, Recipes | API reference, Webhooks |
Quick start: AI agent
1. Get access
Apps that sign in (ChatGPT, Claude.ai and Claude Desktop connectors, the Gemini and Grok apps) only need the server URL, https://postninja.app/api/mcp: you log in and click Allow. For everything else, create an API key under Settings → API in PostNinja.
2. Add the server to your agent
The setup for each agent is on Connect an AI agent. For Claude Code it's one command:
3. Ask
Start with "List my connected accounts", then try "Schedule a post about our launch for tomorrow at 9am on X and Threads, with a shorter X version." More ideas: Recipes.
Quick start: REST API
1. Create an API key
Under Settings → API in PostNinja (owners and admins can). It's shown once; keep it secret, e.g. in POSTNINJA_API_KEY.
2. Get your account ids
3. Schedule a post
Note: Instagram, TikTok, YouTube and Pinterest posts need a photo or video. Upload it first with POST /api/v1/media and pass its id in mediaIds. See Platform rules.