Vai al contenuto
Sviluppatori

Riferimento REST API

Tutto ciò che si trova sotto /public/v1, generato dalle route effettivamente presenti sul server. JSON in ingresso, JSON in uscita.

Indirizzo di base

Invia ogni richiesta a questo indirizzo. Un PostNimbo self-hosted usa invece l'indirizzo del proprio backend.

https://postnimbo.com/api/public/v1

Autenticazione

Inserisci la credenziale nell'header Authorization così com'è, senza prefisso Bearer. Funzionano due tipi:

  • Una chiave API, da Settings > Agents / Dev. Agisce come l'intero workspace e raggiunge tutte le route qui sotto.
  • Un access token OAuth (inizia con pos_), da un'app OAuth. Agisce come il membro che l'ha approvato, vede solo i suoi brand e canali ed è limitato agli scope che ha approvato.
curl https://postnimbo.com/api/public/v1/me \
  -H "Authorization: <api key or pos_ token>"

Una credenziale mancante o errata restituisce 401. Una route per cui il token non è stato approvato restituisce 403. Gli errori contengono un campo msg o message.

Limiti di frequenza

  • 120 richieste al minuto per ogni chiave API o token, su tutte le route.
  • Anche la creazione dei post è limitata per workspace ogni ora (90 per impostazione predefinita).
  • Oltre un limite la risposta è 429 con un header Retry-After in secondi. Attendi quel tempo prima di riprovare.

I server self-hosted impostano i propri limiti con PUBLIC_API_RATE_LIMIT, PUBLIC_API_RATE_TTL e API_LIMIT.

Endpoint

La colonna scope indica ciò di cui ha bisogno un token OAuth. Una chiave API raggiunge tutte le route.

Account

  • GET/public/v1/me

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

    ScopeQualsiasi token
  • GET/public/v1/is-connected

    Check that the credential works.

    ScopeQualsiasi token
  • GET/public/v1/groups

    The brands (customers) the credential can see.

    ScopeQualsiasi token
  • GET/public/v1/counts

    Posts waiting for approval and unread open inbox conversations.

    Scopeposts:readinbox:readInputquery: brandId?

Channels

  • GET/public/v1/integrations

    The connected channels, with their ids and networks.

    Scopeposts:readInputquery: 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.

    ScopeChiave API o token con accesso completo
  • GET/public/v1/find-slot/:id

    The next free posting slot of a channel.

    Scopeposts:read
  • GET/public/v1/social/:integration

    The sign-in link that connects a new channel of a network (for example linkedin).

    ScopeChiave API o token con accesso completoInputquery: refresh? (a channel id to reconnect)
  • DELETE/public/v1/integrations/:id

    Disconnect a channel.

    ScopeChiave API o token con accesso completo
  • POST/public/v1/integration-trigger/:id

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

    ScopeChiave API o token con accesso completoInputbody: { methodName, data }

Posts

  • GET/public/v1/posts

    The posts between two dates.

    Scopeposts:readInputquery: startDate, endDate (ISO 8601), customer?
  • POST/public/v1/posts

    Create a draft, schedule a post or publish now, on one or more channels.

    Scopeposts:scheduleInputbody: { 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.

    ScopeChiave API o token con accesso completoInputbody: { settings }
  • PUT/public/v1/posts/:id/status

    Move a post between draft and scheduled.

    ScopeChiave API o token con accesso completoInputbody: { 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.

    ScopeChiave API o token con accesso completo
  • PUT/public/v1/posts/:id/release-id

    Link a post to the network post it became.

    ScopeChiave API o token con accesso completoInputbody: { releaseId }
  • DELETE/public/v1/posts/:id

    Delete a post.

    ScopeChiave API o token con accesso completo
  • DELETE/public/v1/posts/group/:group

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

    ScopeChiave API o token con accesso completo

Media

  • POST/public/v1/upload

    Upload a file to the media library.

    Scopemedia:writeInputmultipart: file, adjust?
  • POST/public/v1/upload-from-url

    Add a file from a public https address.

    Scopemedia:writeInputbody: { url, adjust? }
  • GET/public/v1/media

    The media library, a page at a time.

    ScopeChiave API o token con accesso completoInputquery: page?, search?, folder?
  • GET/public/v1/media/:id/status

    Whether an uploaded video finished processing.

    ScopeChiave API o token con accesso completo

Ideas

  • POST/public/v1/ideas

    Save an idea to the Ideas board.

    Scopeideas:writeInputbody: { title, content? }
  • DELETE/public/v1/ideas/:id

    Remove an idea the credential saved.

    Scopeideas:write

Analytics

  • GET/public/v1/performance

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

    Scopeanalytics:readInputquery: brandId?, tz?
  • GET/public/v1/best-times/next

    The next best times to post, from your own results.

    Scopeposts:readInputquery: integrationId?, brandId?, tz?, goal?: engagement|reach|views, count? (1-20)
  • GET/public/v1/analytics/:integration

    The analytics of a channel.

    ScopeChiave API o token con accesso completoInputquery: date (days back)
  • GET/public/v1/analytics/post/:postId

    The analytics of one published post.

    ScopeChiave API o token con accesso completoInputquery: date (days back)

AI

  • POST/public/v1/ai/draft

    Draft a post about a web page with PostNimbo AI.

    Scopeai:useInputbody: { url, title?, selection?, mode: summary|captions }
  • POST/public/v1/ai/reply

    Draft a reply to a comment or message.

    Scopeai:useInputbody: { text, url? }

Link in bio

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

    The link-in-bio pages of the workspace.

    Scopelink-in-bio:write
  • POST/public/v1/link-in-bio/:id/links

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

    Scopelink-in-bio:writeInputbody: { label, url }

Video and clipping

  • POST/public/v1/generate-video

    Generate a video with one of the AI video tools.

    ScopeChiave API o token con accesso completo
  • POST/public/v1/video/function

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

    ScopeChiave API o token con accesso completo
  • POST/public/v1/clipping

    Cut a long video into short clips.

    ScopeChiave API o token con accesso completo
  • GET/public/v1/clipping

    The clipping jobs, a page at a time.

    ScopeChiave API o token con accesso completoInputquery: page
  • GET/public/v1/clipping/:id

    One clipping job and its clips.

    ScopeChiave API o token con accesso completo

Notifications

  • GET/public/v1/notifications

    The workspace notifications, a page at a time.

    ScopeChiave API o token con accesso completoInputquery: page?

Webhooks

  • GET/public/v1/webhooks/events

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

    ScopeQualsiasi token
  • GET/public/v1/webhooks

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

    Scopewebhooks:writeInputquery: url?
  • POST/public/v1/webhooks

    Subscribe an address to events (how Zapier, Make and n8n triggers switch on).

    Scopewebhooks:writeInputbody: { url, events?, integrations? (channel ids), name? }
  • DELETE/public/v1/webhooks/:id

    Remove a webhook (how a trigger switches off).

    Scopewebhooks:write

Stai creando qualcosa con PostNimbo?

Raccontaci cosa stai realizzando. Ti aiutiamo con l'API, esaminiamo le app per la directory e aggiungiamo gli endpoint di cui le integrazioni hanno bisogno.