基础地址
所有请求都发送到这个地址。自托管的 PostNimbo 则使用它自己的后端地址。
https://postnimbo.com/api/public/v1
身份验证
把凭据原样放在 Authorization 请求头中,不要加 Bearer 前缀。支持两种凭据:
- API 密钥,在 Settings > Agents / Dev 中获取。它以整个工作区的身份操作,可访问下方所有路由。
- OAuth 访问令牌(以 pos_ 开头),来自 OAuth 应用。它以批准授权的成员身份操作,只能看到该成员的品牌和渠道,并且仅限于其批准的权限范围。
curl https://postnimbo.com/api/public/v1/me \ -H "Authorization: <api key or pos_ token>"
凭据缺失或错误时返回 401。访问令牌未获批准的路由时返回 403。错误信息包含 msg 或 message 字段。
速率限制
- 每个 API 密钥或令牌每分钟 120 次请求,所有路由合计。
- 创建帖子还按工作区限制每小时次数(默认 90 次)。
- 超出限制时返回 429,并附带以秒为单位的 Retry-After 请求头。请等待相应时间后再重试。
自托管服务器通过 PUBLIC_API_RATE_LIMIT、PUBLIC_API_RATE_TTL 和 API_LIMIT 自行设置限制。
端点
权限范围一栏是 OAuth 令牌所需的权限。API 密钥可访问所有路由。
Account
- GET
/public/v1/meThe workspace the credential belongs to, and for an OAuth token the member who approved it.
权限范围任意令牌 - GET
/public/v1/is-connectedCheck that the credential works.
权限范围任意令牌 - GET
/public/v1/groupsThe brands (customers) the credential can see.
权限范围任意令牌 - GET
/public/v1/countsPosts waiting for approval and unread open inbox conversations.
权限范围posts:readinbox:read输入query: brandId?
Channels
- GET
/public/v1/integrationsThe connected channels, with their ids and networks.
权限范围posts:read输入query: group? (a brand id) - GET
/public/v1/integration-settings/:idThe rules of a channel: character limits, media rules and the settings a post needs.
权限范围API 密钥或完全访问令牌 - GET
/public/v1/find-slot/:idThe next free posting slot of a channel.
权限范围posts:read - GET
/public/v1/social/:integrationThe sign-in link that connects a new channel of a network (for example linkedin).
权限范围API 密钥或完全访问令牌输入query: refresh? (a channel id to reconnect) - DELETE
/public/v1/integrations/:idDisconnect a channel.
权限范围API 密钥或完全访问令牌 - POST
/public/v1/integration-trigger/:idRun a lookup a network offers (for example the playlists of a YouTube channel).
权限范围API 密钥或完全访问令牌输入body: { methodName, data }
Posts
- GET
/public/v1/postsThe posts between two dates.
权限范围posts:read输入query: startDate, endDate (ISO 8601), customer? - POST
/public/v1/postsCreate a draft, schedule a post or publish now, on one or more channels.
权限范围posts:schedule输入body: { type: draft|schedule|now, date, shortLink, tags, posts: [{ integration: { id }, value: [{ content, image? }], settings? }] } - PUT
/public/v1/posts/:id/settingsChange the network settings of a post.
权限范围API 密钥或完全访问令牌输入body: { settings } - PUT
/public/v1/posts/:id/statusMove a post between draft and scheduled.
权限范围API 密钥或完全访问令牌输入body: { status: draft|schedule } - GET
/public/v1/posts/:id/missingFor a post the network accepted without returning its id: the recent posts of the channel to pick it from.
权限范围API 密钥或完全访问令牌 - PUT
/public/v1/posts/:id/release-idLink a post to the network post it became.
权限范围API 密钥或完全访问令牌输入body: { releaseId } - DELETE
/public/v1/posts/:idDelete a post.
权限范围API 密钥或完全访问令牌 - DELETE
/public/v1/posts/group/:groupDelete every post of a group (one post sent to several channels).
权限范围API 密钥或完全访问令牌
Media
- POST
/public/v1/uploadUpload a file to the media library.
权限范围media:write输入multipart: file, adjust? - POST
/public/v1/upload-from-urlAdd a file from a public https address.
权限范围media:write输入body: { url, adjust? } - GET
/public/v1/mediaThe media library, a page at a time.
权限范围API 密钥或完全访问令牌输入query: page?, search?, folder? - GET
/public/v1/media/:id/statusWhether an uploaded video finished processing.
权限范围API 密钥或完全访问令牌
Ideas
- POST
/public/v1/ideasSave an idea to the Ideas board.
权限范围ideas:write输入body: { title, content? } - DELETE
/public/v1/ideas/:idRemove an idea the credential saved.
权限范围ideas:write
Analytics
- GET
/public/v1/performanceA summary of the last 7 days: posts, reach and engagement.
权限范围analytics:read输入query: brandId?, tz? - GET
/public/v1/best-times/nextThe next best times to post, from your own results.
权限范围posts:read输入query: integrationId?, brandId?, tz?, goal?: engagement|reach|views, count? (1-20) - GET
/public/v1/analytics/:integrationThe analytics of a channel.
权限范围API 密钥或完全访问令牌输入query: date (days back) - GET
/public/v1/analytics/post/:postIdThe analytics of one published post.
权限范围API 密钥或完全访问令牌输入query: date (days back)
AI
- POST
/public/v1/ai/draftDraft a post about a web page with PostNimbo AI.
权限范围ai:use输入body: { url, title?, selection?, mode: summary|captions } - POST
/public/v1/ai/replyDraft a reply to a comment or message.
权限范围ai:use输入body: { text, url? }
Link in bio
- GET
/public/v1/link-in-bioThe link-in-bio pages of the workspace.
权限范围link-in-bio:write - POST
/public/v1/link-in-bio/:id/linksAdd a link to a link-in-bio page.
权限范围link-in-bio:write输入body: { label, url }
Video and clipping
- POST
/public/v1/generate-videoGenerate a video with one of the AI video tools.
权限范围API 密钥或完全访问令牌 - POST
/public/v1/video/functionLoad the options of a video tool (voices, avatars).
权限范围API 密钥或完全访问令牌 - POST
/public/v1/clippingCut a long video into short clips.
权限范围API 密钥或完全访问令牌 - GET
/public/v1/clippingThe clipping jobs, a page at a time.
权限范围API 密钥或完全访问令牌输入query: page - GET
/public/v1/clipping/:idOne clipping job and its clips.
权限范围API 密钥或完全访问令牌
Notifications
- GET
/public/v1/notificationsThe workspace notifications, a page at a time.
权限范围API 密钥或完全访问令牌输入query: page?
Webhooks
- GET
/public/v1/webhooks/eventsThe events a webhook is sent, with a sample payload of each.
权限范围任意令牌 - GET
/public/v1/webhooksThe webhooks of the workspace, without their addresses; ?url= finds the webhooks of one address.
权限范围webhooks:write输入query: url? - POST
/public/v1/webhooksSubscribe an address to events (how Zapier, Make and n8n triggers switch on).
权限范围webhooks:write输入body: { url, events?, integrations? (channel ids), name? } - DELETE
/public/v1/webhooks/:idRemove a webhook (how a trigger switches off).
权限范围webhooks:write
