技能圖譜SKILLSGROVE
技能圖譜/短影片與自媒體/publora/publora-api-docs/publora-api

publora-api

安裝

$npx skills add https://github.com/publora/publora-api-docs --skill publora-api
$git clone --depth 1 https://github.com/publora/publora-api-docs.git /tmp/publora-api-docs && mkdir -p ~/.claude/skills && cp -r /tmp/publora-api-docs/. ~/.claude/skills/publora-api
請幫我安裝這個 Agent Skill:https://github.com/publora/publora-api-docs/tree/3d7828c4074bc08521d7cecb0d9a568ffe878ce1/ ,先閱讀它的 SKILL.md 和指令碼,確認安全後再安裝到我的技能目錄。

簡介

原文描述 · MITUse this skill when scheduling, publishing, or managing social media posts across multiple platforms (Twitter/X, LinkedIn, Instagram, Threads, TikTok, YouTube, Facebook, Bluesky, Mastodon, Telegram) via the Publora REST API. Also use for retrieving LinkedIn analytics and for Agency client posts through the Company API.
以下 SKILL.md 內容轉載自 publora/publora-api-docs(提交 3d7828c),依據 MIT 許可證轉載正文(文字未改動;僅省略檔案頭後設資料、將圖片顯示為連結,超長內容會截斷);版權歸 2026 Publora (Creative Content Crafts, Inc.) 所有。許可證:LICENSE。僅展示說明檔案,附帶指令碼請在原倉庫檢視。

Publora API Skill

This skill provides complete documentation for the Publora social media scheduling API.

When to Use This Skill

  • Scheduling posts to social media platforms
  • Creating, updating, or deleting social media posts
  • Uploading media (images/videos) for posts
  • Retrieving LinkedIn analytics (impressions, reactions, followers)
  • Adding reactions and comments to LinkedIn posts
  • Setting up webhooks for post status notifications
  • Drafting, reviewing and scheduling Agency client posts (Agency quickstart)
  • Cross-platform posting workflows

API Overview

Base URL: https://api.publora.com/api/v1

Prerequisites (User Must Complete)

Important: You cannot programmatically create accounts or obtain API keys. The user must:

  1. Create account at publora.com (free tier available)
  2. Connect social accounts via OAuth in the dashboard (Channels → Add Channel)
  3. Generate API key at API in sidebar, then provide it to you

Pricing

Plan Monthly Yearly up to −33% Posts/Month Platforms
Starter Free Free 15 All platforms, except X
Pro, per account 1–5 · $5.99<br>6–20 · $2.99<br>21+ · $0.99 $3.99<br>$1.99<br>$0.66 Unlimited All platforms
Agency 1–10 · $59 flat<br>11–50 · $3.00 each<br>51+ · $1.50 each $47.20 flat<br>$2.40 each<br>$1.20 each Unlimited All platforms

Pro is priced per connected account and the tiers combine automatically — e.g. 10 accounts = 5 × $5.99 + 5 × $2.99 = $44.90/mo ($29.90/mo billed yearly).

Agency is priced per connected account across all client workspaces, minimum 10: $59/mo flat covers the first 10, then $3.00 each for accounts 11–50 and $1.50 each for 51+ — e.g. 20 accounts = $59 + 10 × $3.00 = $89/mo ($71.20/mo billed yearly, 20% off). Agency access is enabled on request, with no self-serve signup: contact us via agencies.publora.com or publora.com/pricing. Full tiers: publora.com/pricing.md.

Authentication

Publora uses API keys (not OAuth tokens). Keys never expire and don't require refresh.

Header: x-publora-key: sk_YOUR_API_KEY

const response = await fetch('https://api.publora.com/api/v1/platform-connections', {
  headers: { 'x-publora-key': 'sk_YOUR_API_KEY' }
});

Note: The MCP server uses Authorization: Bearer sk_... instead. Same key, different header format.

Quick Reference

Agency client posts

Use Company context and exact Workspace IDs for Agency work. Start with the Agency quickstart for the end-to-end flow. The Agency platform settings guide covers Stories, reply controls, reposts, disclosure and YouTube metadata/thumbnails. Check the current formats and settings through GET /company/platforms.

Endpoint Method Description
/company/platforms GET Current Company publishing formats and settings
/company/post-groups POST Create an Agency draft with registered platform settings
/company/post-groups/:postGroupId PATCH Update a Company draft (settings replace the map)
/company/post-groups/:postGroupId/media/reservations POST Reserve a post attachment or auxiliary youtube_thumbnail
/company/post-groups/:postGroupId/media/:mediaFileId/complete POST Complete the same Company upload reservation
/company/linkedin-page-posts POST List a connected Company Page's posts as LinkedIn reshare sources (guide)
/company/linkedin-page-posts/batch POST Read up to 50 Company Page posts by ID, optionally with engagement summaries (guide)
/company/linkedin-page-posts/comments POST List comments on one Company Page post (guide)
/company/linkedin-page-posts/reactions POST List reactions on one Company Page post (guide)
/company/post-groups/:postGroupId/approval POST Request a client review round, optionally with a future scheduledTime

Posts

Endpoint Method Description
/list-posts GET List posts with filters
/create-post POST Create a draft, schedule a post, or publish now (publishNow: true)
/get-post/:postGroupId GET Get post details
/update-post/:postGroupId PUT Edit content, targets, timing, or status of a draft/scheduled post
/delete-post/:postGroupId DELETE Delete a post
/get-upload-url POST Get presigned URL for media
/attach-media/:postGroupId POST Attach one file by reference (download_url + file_id, e.g. from ChatGPT); leaves the post in draft
/upload-instagram-cover POST Upload a custom Instagram Reel cover (multipart)
/upload-youtube-thumbnail POST Upload a custom YouTube thumbnail (multipart)
/platform-limits GET Get live per-platform limits (no params)
/account-context GET Plan, features, publishing quotas and schedule horizon (optional scheduledTime query)
/post-logs/:postGroupId GET Get publishing logs for a post

Connections

Endpoint Method Description
/platform-connections GET List connected accounts
/test-connection/:platformId POST Test if a connection is valid

Mastodon & Bluesky Analytics

Endpoint Method Description
/post-statistics POST Get engagement for up to 50 published posts
/profile-statistics POST Get followers/following/post count for a connection

LinkedIn Analytics & Engagement

Endpoint Method Description
/linkedin-post-statistics POST Get post metrics
/linkedin-account-statistics POST Get account metrics
/linkedin-followers POST Get follower count/growth
/linkedin-profile-summary POST Get profile overview
/linkedin-reactions POST Add reaction to a post
/linkedin-reactions DELETE Remove reaction from a post
/linkedin-comments POST Post a comment
/linkedin-comments DELETE Delete a comment
/linkedin-reshare POST Reshare an existing post
/linkedin-mentionables GET List mentionable people (paid plans)

Webhooks

Endpoint Method Description
/webhooks GET List all webhooks
/webhooks POST Create a webhook
/webhooks/:id PATCH Update a webhook
/webhooks/:id DELETE Delete a webhook
/webhooks/:id/regenerate-secret POST Regenerate webhook secret

Common Patterns

Schedule a Post

const response = await fetch('https://api.publora.com/api/v1/create-post', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-publora-key': 'sk_YOUR_API_KEY'
  },
  body: JSON.stringify({
    content: 'Hello world!',
    platforms: ['linkedin-ABC123', 'twitter-456'],
    scheduledTime: '2026-03-01T14:00:00.000Z'
  })
});

Publish Now

Send publishNow: true instead of scheduledTime to publish immediately at server time. It uses the monthly post allowance but no scheduled-queue slot; a future scheduledTime or status: "draft" alongside it returns 400 PUBLISH_NOW_CONFLICT. PUT /update-post/:postGroupId with { "publishNow": true } publishes an existing draft or scheduled post.

await fetch('https://api.publora.com/api/v1/create-post', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-publora-key': 'sk_YOUR_API_KEY',
    'Idempotency-Key': 'launch-2026-03-01'
  },
  body: JSON.stringify({
    content: 'Hello world!',
    platforms: ['linkedin-ABC123'],
    publishNow: true
  })
});

Check Limits Before a Batch

GET /account-context returns the plan, features, monthly and queue quotas (limit: null = unlimited), maxScheduledDate and allowedPlatforms. It is an advisory snapshot; writes are still checked.

Get Connected Platforms

const response = await fetch('https://api.publora.com/api/v1/platform-connections', {
  headers: { 'x-publora-key': 'sk_YOUR_API_KEY' }
});
const { connections } = await response.json();
// Use connections[].platformId for posting

Get LinkedIn Analytics

const response = await fetch('https://api.publora.com/api/v1/linkedin-post-statistics', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-publora-key': 'sk_YOUR_API_KEY'
  },
  body: JSON.stringify({
    postedId: 'urn:li:share:7123456789',
    platformId: 'linkedin-ABC123',
    queryTypes: 'ALL'
  })
});

Comment on LinkedIn Post

const response = await fetch('https://api.publora.com/api/v1/linkedin-comments', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-publora-key': 'sk_YOUR_API_KEY'
  },
  body: JSON.stringify({
    postedId: 'urn:li:ugcPost:7123456789',
    platformId: 'linkedin-ABC123',
    message: 'Great insights! Thanks for sharing.'
  })
});

Create Webhook

const response = await fetch('https://api.publora.com/api/v1/webhooks', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-publora-key': 'sk_YOUR_API_KEY'
  },
  body: JSON.stringify({
    name: 'Production Notifications',
    url: 'https://your-server.com/webhook',
    events: ['post.published', 'post.failed']
  })
});

Key Concepts

Platform IDs

Platform IDs follow the format platform-id:

  • twitter-123456789
  • linkedin-Tz9W5i6ZYG
  • instagram-17841412345678

Get platform IDs from the /platform-connections endpoint.

Scheduled Time Format

Use ISO 8601 UTC format:

2026-03-15T14:00:00.000Z  // Correct
2026-03-15T14:00:00Z      // Also correct

Time must be in the future. A past time is never silently accepted:

  • Less than 5 min in the past (clock skew): clamped to server time, and the 200 response carries warnings: [{ code: "SCHEDULED_TIME_COERCED", requested, effective }]. This tolerance is permanent.
  • 5 min or more in the past: clamped + warned today; scheduled to become 400 SCHEDULED_TIME_IN_PAST on 2026-08-25, unless production configuration overrides the date either way.

A 200 can still mean the API adjusted your request — read warnings, don't discard it. GET /get-post returns the effective stored scheduledTime to confirm what was actually kept.

Retry Safety (Idempotency-Key)

Send an optional Idempotency-Key header on create-post / update-post / attach-media. A timeout never tells you whether the request landed — without a key, the retry creates a second post (and on update-post with mediaUrls, or on attach-media, appends the media twice). On attach-media the key matches the post, file_id and file name, so a refreshed download_url still replays.

const key = crypto.randomUUID();  // one key per logical operation — reuse it for every retry
await fetch('https://api.publora.com/api/v1/create-post', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-publora-key': 'sk_YOUR_API_KEY',
    'Idempotency-Key': key
  },
  body: JSON.stringify({ content: 'Hello', platforms: ['twitter-123456789'] })
});
  • Same key + same body → the original response is replayed (no second post).
  • Same key + different body → 422 / IDEMPOTENCY_KEY_CONFLICT.
  • Same key still processing → 409 / IDEMPOTENCY_IN_FLIGHT — wait and retry the identical call, don't switch keys.
  • Keys are per-user and expire after 24h. Opt-in: without the header, behaviour is unchanged.

Post Statuses

  • draft - Not scheduled
  • scheduled - Waiting to publish
  • published - Successfully posted
  • failed - Publishing failed
  • partially_published - Some platforms failed

LinkedIn Query Types

Available metrics: IMPRESSION, MEMBERS_REACHED, RESHARE, REACTION, COMMENT

Use queryTypes: 'ALL' to get all metrics at once.

Webhook Events

Available events:

  • post.scheduled - Post was scheduled
  • post.published - Post was successfully published
  • post.failed - Post failed to publish
  • post.demoted - Scheduled post returned to draft. reason is media_changed (changeType attach, detach, prune_reference or reorder), media_backstop (changeType scheduler_media_backstop, with errorCode) or state_mismatch (changeType scheduler_state_repair); tolerate unknown values. Not emitted by attach-media
  • token.expiring - Defined and subscribable, but not currently dispatched; do not depend on it

Error Handling

Always check response status:

if (!response.ok) {
  const error = await response.json();
  console.error(error.error); // Error message
}

Common errors:

  • 401: Invalid API key
  • 400: Invalid parameters
  • 404: Resource not found

Machine-readable code values (branch on code, not on the message text):

  • SCHEDULED_TIME_IN_PAST (400) — scheduledTime 5+ min in the past; body carries serverTime
  • PLATFORM_SETTING_UNKNOWN (400) — unknown platformSettings path; body carries the exact field
  • FIRST_COMMENT_INVALID / FIRST_COMMENT_PLATFORM_UNKNOWN / FIRST_COMMENT_TOO_LONG (400) — firstComment or firstComments[] shape (up to three ordered entries with optional integer delaySeconds 0–86,400), platform type (never connection IDs) or per-platform length; body carries field and, for length, platform, limit, count, unit. Use one input field, not both.
  • INVALID_MEDIA_FILE (400) — attach-media body is not { file, fileName? }, the file reference is malformed, download_url fails the URL checks, or the file name is unusable
  • IDEMPOTENCY_KEY_CONFLICT (422) — key reused with a different body
  • IDEMPOTENCY_IN_FLIGHT (409) — same key still processing; retry the identical call

Successful responses may carry a warnings array (e.g. SCHEDULED_TIME_COERCED) — surface it. Full reference: Error Handling.

Resources

<!-- Maintainers: the backend /api/v1/x-bookmarks and /auth/x-bookmarks routes are internal (dashboard X-bookmark sync, gated by requireXBookmarksAccess) — intentionally undocumented, do not add to public API docs. -->

See the docs/ directory for:

  • docs/endpoints/ - Detailed endpoint documentation
  • docs/guides/ - How-to guides
  • docs/examples/ - Code examples in multiple languages
  • docs/platforms/ - Platform-specific information

For agent-facing skills built on this API, see publora/skills.

Agency Workspace webhooks

Agency managers use Company /webhooks or the separate MCP tools company_list_webhooks, company_create_webhook, company_update_webhook, company_delete_webhook and company_regenerate_webhook_secret. Subscriptions carry post.published, post.failed and/or approval.decided (client review decisions; send the Company webhook v2 Accept header). Pass an explicit top-level workspaceId and stable mutation idempotencyKey; there is no command wrapper or action selector. See Agency webhooks; personal webhook endpoints do not access Company subscriptions.

檢視許可證全文(MIT)
MIT License

Copyright (c) 2026 Publora (Creative Content Crafts, Inc.)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.