ベースアドレス
すべてのリクエストをこのアドレスに送信します。セルフホストのPostNimboでは、そのバックエンドのアドレスを使います。
https://postnimbo.com/api/public/v1
認証
認証情報は、Bearerを付けずにそのままAuthorizationヘッダーに入れます。使えるのは次の2種類です。
- Settings > Agents / Dev で取得するAPIキー。ワークスペース全体として動作し、以下のすべてのルートにアクセスできます。
- OAuthアプリから取得するOAuthアクセストークン(pos_で始まります)。承認したメンバーとして動作し、そのメンバーのブランドとチャンネルだけが見え、承認されたスコープに限定されます。
curl https://postnimbo.com/api/public/v1/me \ -H "Authorization: <api key or pos_ token>"
認証情報がないか誤っている場合は401を返します。トークンが承認されていないルートは403を返します。エラーにはmsgまたはmessageフィールドが含まれます。
レート制限
- APIキーまたはトークンごとに、全ルート合計で1分あたり120リクエスト。
- 投稿の作成には、ワークスペースごとに1時間あたりの上限もあります(デフォルトは90件)。
- 上限を超えると、秒数を示すRetry-Afterヘッダー付きで429を返します。その時間だけ待ってから再試行してください。
セルフホストのサーバーでは、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
