Skip to content

Social media API for AI agents

Give your agent one key and it can publish, schedule and check posts on X, Instagram, LinkedIn, TikTok, YouTube and more, through the MCP server or a plain REST call.

No card required.

~/fernhill-blog

> Turn today's blog post into a short LinkedIn post and post it now

⏺ postkey - list_accounts (MCP)(platform: "linkedin")

1 account: LinkedIn · Fernhill Coffee (int_li_544)

⏺ postkey - create_post (MCP)(content: "We moved our roasting to Tuesdays so every bag ships within 48 hours of roast. Here's what changed for our cafés.", platforms: [{ platform: "linkedin", accountId: "int_li_544" }], publishNow: true)

post_3Vn8d · published · linkedin.com/feed/update/urn:li:share:7268… · 1 credit

Posted to Fernhill Coffee's LinkedIn page. It cost 1 credit. Live link: linkedin.com/feed/update/urn:li:share:7268…

What an agent can do with Postkey

Each tool calls one Postkey endpoint and costs the same credits as calling it yourself. Failed networks are refunded.

What an agent can do with Postkey: endpoints and credit costs
ToolWhat it doesEndpointCredits
list_accountsThe connected accounts the agent can post to, with their idsGET /v1/connect/integrations0
create_postPublish now, schedule for a time and time zone, or save a draftPOST /v1/posts1 per network · X 5, or 50 with a link · draft 0
get_postOne post with the result and live URL for each networkGET /v1/posts/{postId}0
list_postsRecent posts, filtered by status, network or dateGET /v1/posts0
list_scheduled_postsEverything queued, soonest firstGET /v1/posts/scheduled0
reschedule_postMove a scheduled post to a new timePATCH /v1/posts/scheduled/{postId}0
cancel_scheduled_postCancel it. It goes back to draftDELETE /v1/posts/scheduled/{postId}Refunds its credits
retry_postSend only the networks that failed againPOST /v1/posts/{postId}/retrySame as posting, refunded if it fails again
upload_mediaUpload an image or video and get a URL to post withPOST /v1/media/upload0
get_connect_linkA sign-in link to connect a new accountGET /v1/connect/{platform}0
get_usageCredits used and left this monthGET /v1/usage0

AI agent questions

Something not here? Email hello@postkey.dev. I answer every one myself.

Book a 15-minute call
  • Use the MCP server when a person chats with the agent, as in Claude, Cursor or Codex. Use REST when your own code or an n8n workflow runs the agent. Both use the same key and credits.

  • No. Each tool call costs the same credits as the API call behind it: 1 per network, 5 on X (50 with a link). Listing accounts, reading posts and moving scheduled posts cost nothing.

  • Only if you let it. Clients ask before each tool call unless you turn on auto-approve. To review every post, ask the agent to save drafts. Drafts cost nothing, and you publish them from the dashboard.

  • In your own client config. It is only sent to mcp.postkey.dev over HTTPS. Make a separate key for each agent, so you can revoke one without touching the others.

Give your agent a key.

$ curl -X POST api.postkey.dev/v1/posts -H "x-access-key: …"

No card required.