Saltar al contenido
Desarrolladores

Referencia de la API REST

Todo lo que hay bajo /public/v1, generado a partir de las rutas que el servidor tiene de verdad. Entra JSON, sale JSON.

Dirección base

Envía cada solicitud a esta dirección. Un PostNimbo autoalojado usa en su lugar su propia dirección de backend.

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

Autenticación

Pon la credencial tal cual en el encabezado Authorization, sin el prefijo Bearer. Funcionan dos tipos:

  • Una clave de API, desde Configuración > Agentes / Desarrolladores. Actúa como todo el espacio de trabajo y accede a todas las rutas de abajo.
  • Un token de acceso OAuth (empieza por pos_), de una app OAuth. Actúa como el miembro que lo aprobó, solo ve sus marcas y canales, y se limita a los scopes que aprobó.
curl https://postnimbo.com/api/public/v1/me \
  -H "Authorization: <api key or pos_ token>"

Una credencial ausente o incorrecta responde 401. Una ruta para la que un token no fue aprobado responde 403. Los errores incluyen un campo msg o message.

Límites de solicitudes

  • 120 solicitudes por minuto por cada clave de API o token, en todas las rutas.
  • Crear publicaciones también tiene un límite por espacio de trabajo cada hora (90 por defecto).
  • Si superas un límite, la respuesta es 429 con un encabezado Retry-After en segundos. Espera ese tiempo antes de volver a intentarlo.

Los servidores autoalojados fijan sus propios límites con PUBLIC_API_RATE_LIMIT, PUBLIC_API_RATE_TTL y API_LIMIT.

Endpoints

La columna Scope indica lo que necesita un token OAuth. Una clave de API accede a todas las rutas.

Account

  • GET/public/v1/me

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

    ÁmbitoCualquier token
  • GET/public/v1/is-connected

    Check that the credential works.

    ÁmbitoCualquier token
  • GET/public/v1/groups

    The brands (customers) the credential can see.

    ÁmbitoCualquier token
  • GET/public/v1/counts

    Posts waiting for approval and unread open inbox conversations.

    Ámbitoposts:readinbox:readEntradaquery: brandId?

Channels

  • GET/public/v1/integrations

    The connected channels, with their ids and networks.

    Ámbitoposts: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.

    ÁmbitoClave de API o token de acceso completo
  • GET/public/v1/find-slot/:id

    The next free posting slot of a channel.

    Ámbitoposts:read
  • GET/public/v1/social/:integration

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

    ÁmbitoClave de API o token de acceso completoEntradaquery: refresh? (a channel id to reconnect)
  • DELETE/public/v1/integrations/:id

    Disconnect a channel.

    ÁmbitoClave de API o token de acceso completo
  • POST/public/v1/integration-trigger/:id

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

    ÁmbitoClave de API o token de acceso completoEntradabody: { methodName, data }

Posts

  • GET/public/v1/posts

    The posts between two dates.

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

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

    Ámbitoposts: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.

    ÁmbitoClave de API o token de acceso completoEntradabody: { settings }
  • PUT/public/v1/posts/:id/status

    Move a post between draft and scheduled.

    ÁmbitoClave de API o token de acceso completoEntradabody: { 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.

    ÁmbitoClave de API o token de acceso completo
  • PUT/public/v1/posts/:id/release-id

    Link a post to the network post it became.

    ÁmbitoClave de API o token de acceso completoEntradabody: { releaseId }
  • DELETE/public/v1/posts/:id

    Delete a post.

    ÁmbitoClave de API o token de acceso completo
  • DELETE/public/v1/posts/group/:group

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

    ÁmbitoClave de API o token de acceso completo

Media

  • POST/public/v1/upload

    Upload a file to the media library.

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

    Add a file from a public https address.

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

    The media library, a page at a time.

    ÁmbitoClave de API o token de acceso completoEntradaquery: page?, search?, folder?
  • GET/public/v1/media/:id/status

    Whether an uploaded video finished processing.

    ÁmbitoClave de API o token de acceso completo

Ideas

  • POST/public/v1/ideas

    Save an idea to the Ideas board.

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

    Remove an idea the credential saved.

    Ámbitoideas:write

Analytics

  • GET/public/v1/performance

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

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

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

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

    The analytics of a channel.

    ÁmbitoClave de API o token de acceso completoEntradaquery: date (days back)
  • GET/public/v1/analytics/post/:postId

    The analytics of one published post.

    ÁmbitoClave de API o token de acceso completoEntradaquery: date (days back)

AI

  • POST/public/v1/ai/draft

    Draft a post about a web page with PostNimbo AI.

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

    Draft a reply to a comment or message.

    Ámbitoai:useEntradabody: { text, url? }

Link in bio

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

    The link-in-bio pages of the workspace.

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

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

    Ámbitolink-in-bio:writeEntradabody: { label, url }

Video and clipping

  • POST/public/v1/generate-video

    Generate a video with one of the AI video tools.

    ÁmbitoClave de API o token de acceso completo
  • POST/public/v1/video/function

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

    ÁmbitoClave de API o token de acceso completo
  • POST/public/v1/clipping

    Cut a long video into short clips.

    ÁmbitoClave de API o token de acceso completo
  • GET/public/v1/clipping

    The clipping jobs, a page at a time.

    ÁmbitoClave de API o token de acceso completoEntradaquery: page
  • GET/public/v1/clipping/:id

    One clipping job and its clips.

    ÁmbitoClave de API o token de acceso completo

Notifications

  • GET/public/v1/notifications

    The workspace notifications, a page at a time.

    ÁmbitoClave de API o token de acceso completoEntradaquery: page?

Webhooks

  • GET/public/v1/webhooks/events

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

    ÁmbitoCualquier token
  • GET/public/v1/webhooks

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

    Ámbitowebhooks:writeEntradaquery: url?
  • POST/public/v1/webhooks

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

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

    Remove a webhook (how a trigger switches off).

    Ámbitowebhooks:write

¿Estás creando algo con PostNimbo?

Cuéntanos qué estás haciendo. Te ayudamos con la API, revisamos apps para el directorio y agregamos los endpoints que necesitan las integraciones.