YourPostWriter

API and MCP

Create drafts, write with AI and schedule posts from your own tools, or from Claude Desktop and other MCP clients.

API keys

  1. Open Settings → API (workspace owners and admins).
  2. Name the key and pick its access: Editor (write and schedule), Read-only or Admin.
  3. Copy the key. It starts with pdk_live_ and is shown only once; we store only a fingerprint of it.

A key acts as the person who created it, inside this workspace only, and never with more rights than that person has today. Revoke a key any time; apps using it stop working at once. Each key may make 60 requests a minute; after that you get status 429 and a Retry-After header.

REST endpoints

Send the key as a Bearer token. Bodies and answers are JSON; errors come back as {"error": "plain-English message"}.

  • GET /api/v1/profiles: your profiles (use the id below)
  • GET /api/v1/posts?status=draft&profileId=…&limit=50: list posts
  • POST /api/v1/posts {"profileId", "body", "firstComment"?, "language"?, "platforms"?}: create a draft
  • GET, PATCH or DELETE /api/v1/posts/:id: read, edit or delete a post (published posts can't be edited)
  • POST /api/v1/posts/:id/schedule {"at": "2026-11-02T09:30:00+05:30"} or {"queue": true}: schedule a post
  • POST /api/v1/ai/write {"profileId", "idea", "language"?, "length"?, "variants"?, "save"?}: AI drafts in your voice (uses AI runs from your plan)
  • GET /api/v1/analytics/summary?profileId=…: results from your imported LinkedIn analytics

Examples

List profiles: curl -H "Authorization: Bearer $API_KEY" https://yourpostwriter.com/api/v1/profiles

Write drafts: curl -X POST -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d '{"profileId":"PROFILE_ID","idea":"What our first 10 customers taught us","length":"short"}' https://yourpostwriter.com/api/v1/ai/write

Save a draft: curl -X POST -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d '{"profileId":"PROFILE_ID","body":"Your post text"}' https://yourpostwriter.com/api/v1/posts

Add it to the queue: curl -X POST -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d '{"queue":true}' https://yourpostwriter.com/api/v1/posts/POST_ID/schedule

MCP (Claude Desktop and other AI assistants)

YourPostWriter is an MCP server at https://yourpostwriter.com/api/mcp (Streamable HTTP, same API key). Tools: list_profiles, list_posts, get_post, create_draft, write_post, schedule_post, get_analytics.

For Claude Desktop, add this to claude_desktop_config.json (it uses the mcp-remote bridge, which needs Node.js), then restart Claude Desktop:

{"mcpServers": {"yourpostwriter": {"command": "npx", "args": ["-y", "mcp-remote", "https://yourpostwriter.com/api/mcp", "--header", "Authorization: Bearer pdk_live_YOUR_KEY"]}}}

Clients that support remote MCP servers with headers can connect directly: URL https://yourpostwriter.com/api/mcp, header Authorization: Bearer pdk_live_YOUR_KEY.

Safety

The API and MCP server publish only through the same official platform APIs as the app. They never read LinkedIn pages and never like, comment, connect or message for you. AI drafts use only facts from your profile; anything else comes back as a [placeholder] to fill in.