Aller au contenu
Développeurs

Référence de l’API REST

Tout ce qui se trouve sous /public/v1, généré à partir des routes réellement présentes sur le serveur. Du JSON en entrée, du JSON en sortie.

Adresse de base

Envoyez chaque requête à cette adresse. Une instance PostNimbo auto-hébergée utilise plutôt sa propre adresse de backend.

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

Authentification

Placez l’identifiant tel quel dans l’en-tête Authorization, sans préfixe Bearer. Deux types fonctionnent :

  • Une clé API, depuis Paramètres > Agents / Dev. Elle agit au nom de tout l’espace de travail et accède à toutes les routes ci-dessous.
  • Un jeton d’accès OAuth (il commence par pos_), issu d’une application OAuth. Il agit au nom du membre qui l’a approuvé, ne voit que ses marques et ses canaux, et se limite aux scopes approuvés.
curl https://postnimbo.com/api/public/v1/me \
  -H "Authorization: <api key or pos_ token>"

Un identifiant manquant ou incorrect renvoie 401. Une route pour laquelle un jeton n’a pas été approuvé renvoie 403. Les erreurs contiennent un champ msg ou message.

Limites de débit

  • 120 requêtes par minute pour chaque clé API ou jeton, toutes routes confondues.
  • La création de publications est aussi limitée par espace de travail et par heure (90 par défaut).
  • Au-delà d’une limite, la réponse est 429 avec un en-tête Retry-After en secondes. Attendez ce délai avant de réessayer.

Les serveurs auto-hébergés définissent leurs propres limites avec PUBLIC_API_RATE_LIMIT, PUBLIC_API_RATE_TTL et API_LIMIT.

Endpoints

La colonne Scope indique ce dont un jeton OAuth a besoin. Une clé API accède à toutes les routes.

Account

  • GET/public/v1/me

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

    PortéeN’importe quel jeton
  • GET/public/v1/is-connected

    Check that the credential works.

    PortéeN’importe quel jeton
  • GET/public/v1/groups

    The brands (customers) the credential can see.

    PortéeN’importe quel jeton
  • GET/public/v1/counts

    Posts waiting for approval and unread open inbox conversations.

    Portéeposts:readinbox:readEntréequery: brandId?

Channels

  • GET/public/v1/integrations

    The connected channels, with their ids and networks.

    Portéeposts:readEntréequery: 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.

    PortéeClé API ou jeton à accès complet
  • GET/public/v1/find-slot/:id

    The next free posting slot of a channel.

    Portéeposts:read
  • GET/public/v1/social/:integration

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

    PortéeClé API ou jeton à accès completEntréequery: refresh? (a channel id to reconnect)
  • DELETE/public/v1/integrations/:id

    Disconnect a channel.

    PortéeClé API ou jeton à accès complet
  • POST/public/v1/integration-trigger/:id

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

    PortéeClé API ou jeton à accès completEntréebody: { methodName, data }

Posts

  • GET/public/v1/posts

    The posts between two dates.

    Portéeposts:readEntréequery: startDate, endDate (ISO 8601), customer?
  • POST/public/v1/posts

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

    Portéeposts:scheduleEntréebody: { 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.

    PortéeClé API ou jeton à accès completEntréebody: { settings }
  • PUT/public/v1/posts/:id/status

    Move a post between draft and scheduled.

    PortéeClé API ou jeton à accès completEntréebody: { 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.

    PortéeClé API ou jeton à accès complet
  • PUT/public/v1/posts/:id/release-id

    Link a post to the network post it became.

    PortéeClé API ou jeton à accès completEntréebody: { releaseId }
  • DELETE/public/v1/posts/:id

    Delete a post.

    PortéeClé API ou jeton à accès complet
  • DELETE/public/v1/posts/group/:group

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

    PortéeClé API ou jeton à accès complet

Media

  • POST/public/v1/upload

    Upload a file to the media library.

    Portéemedia:writeEntréemultipart: file, adjust?
  • POST/public/v1/upload-from-url

    Add a file from a public https address.

    Portéemedia:writeEntréebody: { url, adjust? }
  • GET/public/v1/media

    The media library, a page at a time.

    PortéeClé API ou jeton à accès completEntréequery: page?, search?, folder?
  • GET/public/v1/media/:id/status

    Whether an uploaded video finished processing.

    PortéeClé API ou jeton à accès complet

Ideas

  • POST/public/v1/ideas

    Save an idea to the Ideas board.

    Portéeideas:writeEntréebody: { title, content? }
  • DELETE/public/v1/ideas/:id

    Remove an idea the credential saved.

    Portéeideas:write

Analytics

  • GET/public/v1/performance

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

    Portéeanalytics:readEntréequery: brandId?, tz?
  • GET/public/v1/best-times/next

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

    Portéeposts:readEntréequery: integrationId?, brandId?, tz?, goal?: engagement|reach|views, count? (1-20)
  • GET/public/v1/analytics/:integration

    The analytics of a channel.

    PortéeClé API ou jeton à accès completEntréequery: date (days back)
  • GET/public/v1/analytics/post/:postId

    The analytics of one published post.

    PortéeClé API ou jeton à accès completEntréequery: date (days back)

AI

  • POST/public/v1/ai/draft

    Draft a post about a web page with PostNimbo AI.

    Portéeai:useEntréebody: { url, title?, selection?, mode: summary|captions }
  • POST/public/v1/ai/reply

    Draft a reply to a comment or message.

    Portéeai:useEntréebody: { text, url? }

Link in bio

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

    The link-in-bio pages of the workspace.

    Portéelink-in-bio:write
  • POST/public/v1/link-in-bio/:id/links

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

    Portéelink-in-bio:writeEntréebody: { label, url }

Video and clipping

  • POST/public/v1/generate-video

    Generate a video with one of the AI video tools.

    PortéeClé API ou jeton à accès complet
  • POST/public/v1/video/function

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

    PortéeClé API ou jeton à accès complet
  • POST/public/v1/clipping

    Cut a long video into short clips.

    PortéeClé API ou jeton à accès complet
  • GET/public/v1/clipping

    The clipping jobs, a page at a time.

    PortéeClé API ou jeton à accès completEntréequery: page
  • GET/public/v1/clipping/:id

    One clipping job and its clips.

    PortéeClé API ou jeton à accès complet

Notifications

  • GET/public/v1/notifications

    The workspace notifications, a page at a time.

    PortéeClé API ou jeton à accès completEntréequery: page?

Webhooks

  • GET/public/v1/webhooks/events

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

    PortéeN’importe quel jeton
  • GET/public/v1/webhooks

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

    Portéewebhooks:writeEntréequery: url?
  • POST/public/v1/webhooks

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

    Portéewebhooks:writeEntréebody: { url, events?, integrations? (channel ids), name? }
  • DELETE/public/v1/webhooks/:id

    Remove a webhook (how a trigger switches off).

    Portéewebhooks:write

Vous créez quelque chose avec PostNimbo ?

Dites-nous ce que vous préparez. Nous vous aidons avec l’API, examinons les applications pour l’annuaire et ajoutons les endpoints dont les intégrations ont besoin.