Skip to main content
Sign Up
AI Agents API

Social Media API for AI Agents

Let your agent write, schedule, and publish posts to every major social network. PostPeer ships an MCP server and a typed SDK, so any agent framework (Claude, GPT, LangChain, CrewAI) can post in one call.

  • Drop-in MCP server for Claude Code, Cursor, Zed, and any MCP client
  • Works with OpenAI function calling and Anthropic tool use out of the box
  • One endpoint covers Twitter, LinkedIn, Instagram, TikTok, YouTube, Pinterest, Bluesky
  • Schedule before publishing, review in the dashboard, cancel anytime
No credit card required.
POST https://api.postpeer.dev/v1/posts
{ "platforms": ["twitter", "linkedin", "instagram], "content": "Hello world!" }
Published
5 platforms
TwitterLinkedInFacebook+2
All posts delivered
Scheduled
queue
12
Queued
847
Sent
Next: in 15 min
Platforms
connected
XIGFBLITT
One API, every platform
P

"Awesome tool and even more awesome support"

Petrus, Founder at Redcove

Divanshu KhatterMarketing Manager at Sembark

"Couldn't figure out the official Pinterest API. PostPeer was smooth. Using it daily."

Divanshu Khatter, Marketing Manager at Sembark

How It Works

Add social media to your product in three steps.

01

Get Your API Key

Sign up and get your API key instantly — no sales calls, no complex onboarding.

02

Integrate in Minutes

A single endpoint to post, schedule, and manage content. Drop it into your product and go.

03

Your Users Post Everywhere

Your product now supports every major social platform — without you maintaining a single integration.

API Response Format

Clean, structured JSON that's easy to parse and integrate

Request

POST
// Inside an Anthropic tool-use loop
const tools = [{
  name: "post_to_social",
  description: "Publish or schedule a post to one or more social platforms",
  input_schema: {
    type: "object",
    properties: {
      content: { type: "string" },
      platforms: { type: "array", items: { type: "object" } },
      scheduledFor: { type: "string" },
      timezone: { type: "string" }
    },
    required: ["content", "platforms"]
  }
}];

// When the model calls the tool:
await fetch("https://api.postpeer.dev/v1/posts", {
  method: "POST",
  headers: { "x-access-key": process.env.POSTPEER_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify(toolInput),
});

Response

JSON
{
  "success": true,
  "postId": "post_agent_001",
  "status": "published",
  "platforms": [
    {
      "platform": "twitter",
      "success": true,
      "platformPostUrl": "https://x.com/user/status/123"
    },
    {
      "platform": "linkedin",
      "success": true,
      "platformPostUrl": "https://www.linkedin.com/feed/update/urn:li:share:456"
    }
  ]
}

Built For Agent Workflows

PostPeer's API is designed for the way agents actually work. Small surface area, predictable shapes, sane defaults. Full setup tutorial at /blog/automate-social-media-with-claude-code-and-ai-agents.

MCP Server, One-Line Install

Run `claude mcp add postpeer_mcp_api --env POSTPEER_API_KEY=... -- npx -y postpeer-mcp` and your agent has tools to post, schedule, list integrations, and search docs. No glue code, no custom tool definitions.

Tool Calling for Any LLM

If your agent uses Anthropic tool use or OpenAI function calling, wrap the PostPeer REST endpoint as a single tool. The schema is small enough to fit comfortably in a system prompt.

Sandbox Execution

The MCP runs typed TypeScript in a sandbox. Your agent can compose multi-step flows (list integrations, pick the right one, post, fetch analytics) without juggling raw HTTP.

Idempotent, Reviewable Scheduling

Have the agent schedule for an hour out instead of publishing immediately. You get a queue you can review in the dashboard before anything goes live. Agents make mistakes, queues catch them.

Cross-Platform In One Call

An agent that picks the right platform for each piece of content can fan out to all of them in a single request. PostPeer normalizes character limits, media formats, and OAuth scopes per platform.

Analytics For Feedback Loops

Pull impressions, likes, and engagement rates back into your agent so it can learn what works. One analytics endpoint, one credit per call, every connected platform.

Frequently Asked Questions

Ready to Add Social Media to Your Product?

One API. Every platform. Start building with free credits.

Start Posting for FreeNo credit card required.
POST https://api.postpeer.dev/v1/posts
{ "platforms": ["twitter", "linkedin", "instagram], "content": "Hello world!" }
Published
5 platforms
TwitterLinkedInFacebook+2
All posts delivered
Scheduled
queue
12
Queued
847
Sent
Next: in 15 min
Platforms
connected
XIGFBLITT
One API, every platform