Pular para o conteúdo
Desenvolvedores

Referência da API REST

Tudo em /public/v1, gerado a partir das rotas que o servidor realmente tem. JSON na entrada, JSON na saída.

Endereço base

Envie todas as requisições para este endereço. Um PostNimbo auto-hospedado usa o endereço do próprio backend.

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

Autenticação

Coloque a credencial no header Authorization como ela é, sem o prefixo Bearer. Dois tipos funcionam:

  • Uma chave de API, em Settings > Agents / Dev. Ela age como o workspace inteiro e acessa todas as rotas abaixo.
  • Um token de acesso OAuth (começa com pos_), de um app OAuth. Ele age como o membro que o aprovou, vê apenas as marcas e os canais dele e fica limitado aos escopos que ele aprovou.
curl https://postnimbo.com/api/public/v1/me \
  -H "Authorization: <api key or pos_ token>"

Uma credencial ausente ou errada retorna 401. Uma rota para a qual o token não foi aprovado retorna 403. Os erros trazem um campo msg ou message.

Limites de requisições

  • 120 requisições por minuto para cada chave de API ou token, somando todas as rotas.
  • A criação de posts também é limitada por workspace a cada hora (90 por padrão).
  • Acima de um limite, a resposta é 429 com um header Retry-After em segundos. Espere esse tempo antes de tentar novamente.

Servidores auto-hospedados definem seus próprios limites com PUBLIC_API_RATE_LIMIT, PUBLIC_API_RATE_TTL e API_LIMIT.

Endpoints

A coluna de escopo é o que um token OAuth precisa. Uma chave de API acessa todas as rotas.

Account

  • GET/public/v1/me

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

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

    Check that the credential works.

    EscopoQualquer token
  • GET/public/v1/groups

    The brands (customers) the credential can see.

    EscopoQualquer token
  • GET/public/v1/counts

    Posts waiting for approval and unread open inbox conversations.

    Escopoposts:readinbox:readEntradaquery: brandId?

Channels

  • GET/public/v1/integrations

    The connected channels, with their ids and networks.

    Escopoposts:readEntradaquery: 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.

    EscopoChave de API ou token de acesso total
  • GET/public/v1/find-slot/:id

    The next free posting slot of a channel.

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

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

    EscopoChave de API ou token de acesso totalEntradaquery: refresh? (a channel id to reconnect)
  • DELETE/public/v1/integrations/:id

    Disconnect a channel.

    EscopoChave de API ou token de acesso total
  • POST/public/v1/integration-trigger/:id

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

    EscopoChave de API ou token de acesso totalEntradabody: { methodName, data }

Posts

  • GET/public/v1/posts

    The posts between two dates.

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

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

    Escopoposts:scheduleEntradabody: { 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.

    EscopoChave de API ou token de acesso totalEntradabody: { settings }
  • PUT/public/v1/posts/:id/status

    Move a post between draft and scheduled.

    EscopoChave de API ou token de acesso totalEntradabody: { 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.

    EscopoChave de API ou token de acesso total
  • PUT/public/v1/posts/:id/release-id

    Link a post to the network post it became.

    EscopoChave de API ou token de acesso totalEntradabody: { releaseId }
  • DELETE/public/v1/posts/:id

    Delete a post.

    EscopoChave de API ou token de acesso total
  • DELETE/public/v1/posts/group/:group

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

    EscopoChave de API ou token de acesso total

Media

  • POST/public/v1/upload

    Upload a file to the media library.

    Escopomedia:writeEntradamultipart: file, adjust?
  • POST/public/v1/upload-from-url

    Add a file from a public https address.

    Escopomedia:writeEntradabody: { url, adjust? }
  • GET/public/v1/media

    The media library, a page at a time.

    EscopoChave de API ou token de acesso totalEntradaquery: page?, search?, folder?
  • GET/public/v1/media/:id/status

    Whether an uploaded video finished processing.

    EscopoChave de API ou token de acesso total

Ideas

  • POST/public/v1/ideas

    Save an idea to the Ideas board.

    Escopoideas:writeEntradabody: { title, content? }
  • DELETE/public/v1/ideas/:id

    Remove an idea the credential saved.

    Escopoideas:write

Analytics

  • GET/public/v1/performance

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

    Escopoanalytics:readEntradaquery: brandId?, tz?
  • GET/public/v1/best-times/next

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

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

    The analytics of a channel.

    EscopoChave de API ou token de acesso totalEntradaquery: date (days back)
  • GET/public/v1/analytics/post/:postId

    The analytics of one published post.

    EscopoChave de API ou token de acesso totalEntradaquery: date (days back)

AI

  • POST/public/v1/ai/draft

    Draft a post about a web page with PostNimbo AI.

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

    Draft a reply to a comment or message.

    Escopoai:useEntradabody: { text, url? }

Link in bio

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

    The link-in-bio pages of the workspace.

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

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

    Escopolink-in-bio:writeEntradabody: { label, url }

Video and clipping

  • POST/public/v1/generate-video

    Generate a video with one of the AI video tools.

    EscopoChave de API ou token de acesso total
  • POST/public/v1/video/function

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

    EscopoChave de API ou token de acesso total
  • POST/public/v1/clipping

    Cut a long video into short clips.

    EscopoChave de API ou token de acesso total
  • GET/public/v1/clipping

    The clipping jobs, a page at a time.

    EscopoChave de API ou token de acesso totalEntradaquery: page
  • GET/public/v1/clipping/:id

    One clipping job and its clips.

    EscopoChave de API ou token de acesso total

Notifications

  • GET/public/v1/notifications

    The workspace notifications, a page at a time.

    EscopoChave de API ou token de acesso totalEntradaquery: page?

Webhooks

  • GET/public/v1/webhooks/events

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

    EscopoQualquer token
  • GET/public/v1/webhooks

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

    Escopowebhooks:writeEntradaquery: url?
  • POST/public/v1/webhooks

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

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

    Remove a webhook (how a trigger switches off).

    Escopowebhooks:write

Está criando algo com o PostNimbo?

Conte o que você está fazendo. Ajudamos com a API, analisamos apps para o diretório e adicionamos os endpoints de que as integrações precisam.