Public API

Postiv Public API

Use the Public API to connect trusted agents and automations to a Postiv workspace. The API can add knowledge, create document post drafts, schedule text or image posts, list LinkedIn profiles, and read cached analytics.

Authentication

Send the organization API key with either x-api-key or an Authorization bearer token.

bash
curl https://postiv.ai/api/public/workspace \
  -H "Authorization: Bearer pk_postiv_..."

Scopes

workspace:readknowledge:writeknowledge:readposts:readposts:writeposts:scheduleimages:writeprofiles:readanalytics:readinspiration:read

Existing knowledge-base keys remain limited to knowledge:write. New keys generated from Settings receive the full set of scopes listed above; use "Regenerate Key (adds new scopes)" in Settings, under Integrations, to explicitly replace a legacy key.

Endpoints

GET/api/public/workspaceworkspace:readRead workspace identity and key scope context.
POST/api/public/knowledgeknowledge:writeAdd a text knowledge item to the organization knowledge base.
GET/api/public/knowledge/searchknowledge:readSemantically search the workspace knowledge base.
GET/api/public/inspirationinspiration:readSearch/filter moderated LinkedIn inspiration by topic, creator, recency, engagement, format, and creator size.
GET/api/public/templatesposts:readSearch global and workspace LinkedIn post templates.
GET/api/public/linkedin-profilesprofiles:readList active LinkedIn profiles/pages available in the workspace.
GET/api/public/linkedin-profiles/:id/writing-styleprofiles:readRead a profile's trained writing style and model-ready instructions.
GET/api/public/content-plansposts:readList Bob content plans with plan items and pillar distribution.
GET/api/public/content-plan-items/:idposts:readRead one Bob plan item with its saved source material.
GET/api/public/comment-plugs/configprofiles:readRead default Comment Plug settings and readiness for workspace profiles.
POST/api/public/comment-plugs/configposts:scheduleSet a profile's default Comment Plug for future scheduled posts.
POST/api/public/postsposts:writeCreate a document post draft.
GET/api/public/postsposts:readList workspace posts by status, profile, search, limit, and offset.
GET/api/public/posts/:idposts:readRead one post draft or scheduled/published record.
PATCH/api/public/posts/:idposts:writeUpdate draft title, content, or assigned LinkedIn profile.
POST/api/public/posts/:id/scheduleposts:scheduleSchedule a text, image, or carousel post through the publish queue.
PATCH/api/public/posts/:id/scheduleposts:scheduleReschedule a scheduled post to a new time.
DELETE/api/public/posts/:id/scheduleposts:scheduleCancel a scheduled publish; the post returns to draft.
POST/api/public/images/:id/editimages:writeEdit an existing Postiv image with instructions, stacking a new version on the same image.
POST/api/public/carouselsposts:writeGenerate a branded LinkedIn carousel from a structured content outline.
POST/api/public/infographicsposts:writeGenerate a branded single-canvas infographic that publishes as an image post.
GET/api/public/carousels/:idposts:readRead a carousel or infographic: slide summaries, status, and render readiness.
POST/api/public/carousels/:id/renderposts:writeRender slide preview images and the publish-ready PDF (required before scheduling), or the infographic canvas PNG.
POST/api/public/carousels/:id/edit-slideposts:writeEdit one slide with a natural-language instruction, saving a new version.
GET/api/public/analytics/accountsanalytics:readList cached analytics accounts.
GET/api/public/analytics/summaryanalytics:readRead cached KPI summary for one account or all accounts.
GET/api/public/analytics/performanceanalytics:readRead cached performance overview series.
GET/api/public/analytics/top-postsanalytics:readRead top posts with signed media URLs where available.
GET/api/public/analytics/posts/:idanalytics:readRead cached analytics for one Postiv or analytics post id.

Post Workflow

  1. 1. Call GET /api/public/linkedin-profiles and choose an id.
  2. 2. Read that profile's writing style and search the knowledge base before drafting original content. Optionally search templates or select a Bob plan item.
  3. 3. Call POST /api/public/posts to create a document draft. Pass templateId or planItemId when applicable so attribution stays linked.
  4. 4. Optionally patch the draft content or profile assignment.
  5. 5. Call POST /api/public/posts/:id/schedule with an ISO scheduled time.

Content is stored verbatim by default. Pass "humanize": true on create to run Postiv's humanizer over the content before saving (the same anti-AI-pattern pass the in-app assistant uses); updates are always verbatim. Scheduling never publishes immediately: scheduledTime must be at least 2 minutes in the future, and if the target profile has approvers configured the post waits for their approval (check requiresApproval in the response). If the post has an image attached in Postiv and you omit mediaType/mediaUrls, the image is included automatically.

Analytics Workflow

Public analytics endpoints are read-only and return cached/imported analytics from Postiv tables. They do not force LinkedIn refreshes. accountId is required: use an account id from GET /api/public/analytics/accounts (each maps to one LinkedIn profile) for per-profile numbers, or accountId=all for an explicit workspace-wide aggregate.

Hosted MCP

The hosted MCP server exposes the same workspace automation surface as the Public API. It uses the same organization API key, the same scopes, and the same server-side services behind the public endpoints. The endpoint is https://postiv.ai/mcp (https://postiv.ai/api/mcp/mcp also works).

In hosts that support MCP Apps, such as claude.ai, tools render interactive widgets instead of plain text: a post editor card, an image preview, a carousel pager, and inspiration cards.

MCPget_workspaceworkspace:readRead workspace identity and available scopes.
MCPadd_knowledgeknowledge:writeAdd a text knowledge item.
MCPsearch_knowledgeknowledge:readSemantically search the workspace knowledge base.
MCPsearch_templatesposts:readSearch proven global and workspace post templates.
MCPsearch_inspirationinspiration:readSearch/filter inspiration by topic, creator, recency, engagement, format, and creator size.
MCPlist_linkedin_profilesprofiles:readList available LinkedIn profiles/pages.
MCPget_writing_styleprofiles:readRead a profile's trained voice, rules, instructions, learnings, and examples.
MCPlist_content_plansposts:readList Bob plans and their pillar distribution for a profile.
MCPget_content_plan_itemposts:readRead one Bob plan item with its exact angle and saved sources.
MCPget_comment_plug_configprofiles:readRead profile default Comment Plug settings and readiness.
MCPset_comment_plug_configposts:scheduleSet a profile default Comment Plug for future schedules.
MCPcreate_postposts:writeCreate a document post draft.
MCPlist_postsposts:readList workspace posts.
MCPget_postposts:readRead a post.
MCPupdate_postposts:writeUpdate a draft post.
MCPschedule_postposts:scheduleSchedule a text, image, or carousel post.
MCPunschedule_postposts:scheduleCancel a scheduled publish; the post returns to draft.
MCPreschedule_postposts:scheduleMove a scheduled post to a new publish time.
MCPgenerate_post_imageimages:writeGenerate a branded AI image for a post, returned inline in the client.
MCPedit_post_imageimages:writeEdit an existing image with instructions, stacking a new version to iterate on.
MCPcreate_carouselposts:writeGenerate a branded LinkedIn carousel from a structured content outline.
MCPcreate_infographicposts:writeGenerate a branded single-canvas infographic that publishes as an image post.
MCPrender_carouselposts:writeRender slide previews + the publish PDF (or the infographic canvas PNG), shown inline in the client.
MCPget_carouselposts:readRead a carousel with slide summaries and render readiness.
MCPedit_carousel_slideposts:writeEdit one carousel slide with a natural-language instruction.
MCPlist_analytics_accountsanalytics:readList cached analytics accounts.
MCPget_analytics_summaryanalytics:readRead cached KPI summary.
MCPget_performance_overviewanalytics:readRead cached performance overview.
MCPget_top_postsanalytics:readRead top cached posts.
MCPget_post_analyticsanalytics:readRead cached analytics for one specific post.

claude.ai (custom connector)

claude.ai custom connectors can only take a URL, they cannot send a header, so the API key goes in the path instead of an Authorization header. Treat this URL as a secret, the same as the key itself.

bash
https://postiv.ai/mcp/pk_postiv_...
  1. 1. In claude.ai, go to Settings, then Connectors.
  2. 2. Click "Add custom connector".
  3. 3. Paste the URL above with your own key in it.
claude.ai Settings, Connectors page
claude.ai Add custom connector dialog with the Postiv URL pasted

Claude Code

bash
claude mcp add --transport http postiv https://postiv.ai/mcp \
  --header "Authorization: Bearer pk_postiv_..."

Generic Streamable HTTP Client

json
{
  "postiv": {
    "url": "https://postiv.ai/mcp",
    "headers": {
      "Authorization": "Bearer pk_postiv_..."
    }
  }
}

Claude Desktop With mcp-remote

json
{
  "mcpServers": {
    "postiv": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://postiv.ai/mcp",
        "--header",
        "Authorization: Bearer pk_postiv_..."
      ]
    }
  }
}

Examples

Add Knowledge

bash
curl -X POST https://postiv.ai/api/public/knowledge \
  -H "x-api-key: pk_postiv_..." \
  -H "Content-Type: application/json" \
  -d '{"title":"Q3 positioning","content":"Our strongest market message is..."}'

Create A Draft

bash
curl -X POST https://postiv.ai/api/public/posts \
  -H "Authorization: Bearer pk_postiv_..." \
  -H "Content-Type: application/json" \
  -d '{"title":"Launch lessons","content":"Three things we learned from launch week...","integrationId":123,"humanize":true}'

Schedule A Draft

bash
curl -X POST https://postiv.ai/api/public/posts/POST_ID/schedule \
  -H "Authorization: Bearer pk_postiv_..." \
  -H "Content-Type: application/json" \
  -d '{"integrationId":123,"scheduledTime":"2026-07-08T09:30:00.000Z","mediaType":"text"}'

Edit An Image

bash
curl -X POST https://postiv.ai/api/public/images/IMAGE_ID/edit \
  -H "Authorization: Bearer pk_postiv_..." \
  -H "Content-Type: application/json" \
  -d '{"editPrompt":"Make the background darker and increase the contrast of the headline."}'

Read Analytics

bash
curl "https://postiv.ai/api/public/analytics/top-posts?accountId=all&limit=10&sort=impressions" \
  -H "Authorization: Bearer pk_postiv_..."