コンテンツへスキップ
開発者

REST APIリファレンス

/public/v1 以下のすべてを、サーバーに実在するルートから生成しています。入力も出力もJSONです。

ベースアドレス

すべてのリクエストをこのアドレスに送信します。セルフホストの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/me

    The workspace the credential belongs to, and for an OAuth token the member who approved it.

    スコープ任意のトークン
  • GET/public/v1/is-connected

    Check that the credential works.

    スコープ任意のトークン
  • GET/public/v1/groups

    The brands (customers) the credential can see.

    スコープ任意のトークン
  • GET/public/v1/counts

    Posts waiting for approval and unread open inbox conversations.

    スコープposts:readinbox:read入力query: brandId?

Channels

  • GET/public/v1/integrations

    The connected channels, with their ids and networks.

    スコープposts:read入力query: group? (a brand id)
  • GET/public/v1/integration-settings/:id

    The rules of a channel: character limits, media rules and the settings a post needs.

    スコープAPIキーまたはフルアクセストークン
  • GET/public/v1/find-slot/:id

    The next free posting slot of a channel.

    スコープposts:read
  • GET/public/v1/social/:integration

    The 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/:id

    Disconnect a channel.

    スコープAPIキーまたはフルアクセストークン
  • POST/public/v1/integration-trigger/:id

    Run a lookup a network offers (for example the playlists of a YouTube channel).

    スコープAPIキーまたはフルアクセストークン入力body: { methodName, data }

Posts

  • GET/public/v1/posts

    The posts between two dates.

    スコープposts:read入力query: startDate, endDate (ISO 8601), customer?
  • POST/public/v1/posts

    Create 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/settings

    Change the network settings of a post.

    スコープAPIキーまたはフルアクセストークン入力body: { settings }
  • PUT/public/v1/posts/:id/status

    Move a post between draft and scheduled.

    スコープAPIキーまたはフルアクセストークン入力body: { status: draft|schedule }
  • GET/public/v1/posts/:id/missing

    For 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-id

    Link a post to the network post it became.

    スコープAPIキーまたはフルアクセストークン入力body: { releaseId }
  • DELETE/public/v1/posts/:id

    Delete a post.

    スコープAPIキーまたはフルアクセストークン
  • DELETE/public/v1/posts/group/:group

    Delete every post of a group (one post sent to several channels).

    スコープAPIキーまたはフルアクセストークン

Media

  • POST/public/v1/upload

    Upload a file to the media library.

    スコープmedia:write入力multipart: file, adjust?
  • POST/public/v1/upload-from-url

    Add a file from a public https address.

    スコープmedia:write入力body: { url, adjust? }
  • GET/public/v1/media

    The media library, a page at a time.

    スコープAPIキーまたはフルアクセストークン入力query: page?, search?, folder?
  • GET/public/v1/media/:id/status

    Whether an uploaded video finished processing.

    スコープAPIキーまたはフルアクセストークン

Ideas

  • POST/public/v1/ideas

    Save an idea to the Ideas board.

    スコープideas:write入力body: { title, content? }
  • DELETE/public/v1/ideas/:id

    Remove an idea the credential saved.

    スコープideas:write

Analytics

  • GET/public/v1/performance

    A summary of the last 7 days: posts, reach and engagement.

    スコープanalytics:read入力query: brandId?, tz?
  • GET/public/v1/best-times/next

    The 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/:integration

    The analytics of a channel.

    スコープAPIキーまたはフルアクセストークン入力query: date (days back)
  • GET/public/v1/analytics/post/:postId

    The analytics of one published post.

    スコープAPIキーまたはフルアクセストークン入力query: date (days back)

AI

  • POST/public/v1/ai/draft

    Draft a post about a web page with PostNimbo AI.

    スコープai:use入力body: { url, title?, selection?, mode: summary|captions }
  • POST/public/v1/ai/reply

    Draft a reply to a comment or message.

    スコープai:use入力body: { text, url? }

Link in bio

  • GET/public/v1/link-in-bio

    The link-in-bio pages of the workspace.

    スコープlink-in-bio:write
  • POST/public/v1/link-in-bio/:id/links

    Add a link to a link-in-bio page.

    スコープlink-in-bio:write入力body: { label, url }

Video and clipping

  • POST/public/v1/generate-video

    Generate a video with one of the AI video tools.

    スコープAPIキーまたはフルアクセストークン
  • POST/public/v1/video/function

    Load the options of a video tool (voices, avatars).

    スコープAPIキーまたはフルアクセストークン
  • POST/public/v1/clipping

    Cut a long video into short clips.

    スコープAPIキーまたはフルアクセストークン
  • GET/public/v1/clipping

    The clipping jobs, a page at a time.

    スコープAPIキーまたはフルアクセストークン入力query: page
  • GET/public/v1/clipping/:id

    One clipping job and its clips.

    スコープAPIキーまたはフルアクセストークン

Notifications

  • GET/public/v1/notifications

    The workspace notifications, a page at a time.

    スコープAPIキーまたはフルアクセストークン入力query: page?

Webhooks

  • GET/public/v1/webhooks/events

    The events a webhook is sent, with a sample payload of each.

    スコープ任意のトークン
  • GET/public/v1/webhooks

    The webhooks of the workspace, without their addresses; ?url= finds the webhooks of one address.

    スコープwebhooks:write入力query: url?
  • POST/public/v1/webhooks

    Subscribe 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/:id

    Remove a webhook (how a trigger switches off).

    スコープwebhooks:write

PostNimboを使って何か開発していますか?

作っているものを教えてください。APIについてのサポート、ディレクトリ掲載アプリの審査、連携に必要なエンドポイントの追加を行います。