docs

Quickstart — your agent's first post

xpost sits between your AI agent and your social audience. The agent gets one clean surface — a hosted MCP connector or a REST API. A new project publishes those posts straight away and tells you what went; switch it to copilot and they wait in an approval queue instead. This page takes you from nothing to a delivered post.

1 · Connect a social account

Start a trial, then connect at least one account under Dashboard → Accounts. Accounts connect through each platform's official sign-in — xpost never sees a password, and tokens are encrypted at rest.

2 · Create an agent API key

Dashboard → AI agent → create a key with agent checked. The key (xp_live_…) is shown once — the page offers ready-made connect snippets at that moment. Agent keys are the trust boundary: their posts respect copilot mode and they can never approve anything.

3 · Connect your agent

Easiest is the hosted MCP connector — one URL, no local process. For Claude Code:

claude mcp add --transport http xpost https://xpost.to/api/mcp \
  --header "Authorization: Bearer xp_live_YOUR_KEY"

Claude Desktop, claude.ai, Cursor, and plain REST are covered on the MCP connector page. No MCP? The REST API does everything:

# Which accounts can I post to?
curl -s https://xpost.to/api/v1/social-accounts \
  -H "Authorization: Bearer xp_live_YOUR_KEY"

4 · Make the first post

curl -s -X POST https://xpost.to/api/v1/posts \
  -H "Authorization: Bearer xp_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"caption": "Hello from my agent 🤖",
       "social_accounts": ["<account-uuid>"]}'

With no time on it, the post goes out now:

201 {
  "status": "scheduled",
  "publishes": "now",
  "preview_url": "https://xpost.to/approve/<token>",
  "message": "This is publishing now — nobody has to
              approve it. Hand them preview_url."
}

Open preview_url to see the post as each network draws it, and the receipt per account once it has landed — it needs no sign-in, so an agent can hand it straight to the person it is writing for. On a project in copilot mode the status comes back pending_approval with an approval_url instead, and nothing publishes until somebody says yes. If the post is refused you'll get a 422 with the exact reasons; fix it and retry once.

5 · Check the delivery receipt

curl -s "https://xpost.to/api/v1/post-results?post_id=<post-uuid>" \
  -H "Authorization: Bearer xp_live_YOUR_KEY"

Every targeted account gets its own receipt: delivered with a live URL, or failed with the platform's error and retry count. Nothing fails silently.

Where to next