Skip to content

Accounts and connections

Connect a provider once and choose which accounts PubNio can use.

A connection is an authorization PubNio can use. A provider account is a specific destination PubNio can act on. Keep the two separate: one connection can reach several destinations.

Connect an account

Open the workspace and connect Facebook, Instagram, LinkedIn, Pinterest, TikTok, X, or YouTube. The provider returns the accounts it authorized; choose the ones PubNio may use. Pass an optional profileId on connect to group new accounts under a brand or customer. Pinterest connections discover the boards the grant can read, and each board is a separate publishing destination.

The API exposes the same flow:

  1. POST /api/v1/integrations/{provider}/connect with a workspaceId.
  2. Open the returned URL and finish consent.
  3. Poll GET /api/v1/integrations/attempts/{attemptId} for the result.
  4. List the discovered accounts with GET /api/v1/integrations.

Readiness and reconnects

GET /api/v1/integrations/accounts/{accountId} reports readiness from the last recorded grant, the selection, and credential expiry. Each account includes its accountKind, optional parentAccountId, and computed capabilities. A live check still runs before dispatch.

If a provider revokes access or a credential expires, the account becomes unavailable. Reauthorize that ID with POST /api/v1/integrations/accounts/{accountId}/reconnect; PubNio preserves the account ID and its delivery history.

An owner can remove a shared grant with DELETE /api/v1/integrations/connections/{connectionId}. That disables every account using it and blocks new writes while preserving records.

Profiles

A workspace is the tenant and ownership boundary. A profile is a brand or customer grouping inside one workspace. Every workspace starts with one Default profile, and writes that attach an account use it when profileId is omitted. List profiles with GET /api/v1/profiles?workspaceId=. Owners can create, rename, or archive profiles; members can read them. The default profile cannot be archived, and a profile with accounts must be emptied with POST /api/v1/integrations/accounts/{accountId}/profile before archival.

Workspaces and keys

Every request that touches workspace content takes a workspaceId query parameter. A workspace API key is restricted to that workspace.

Scope Grants
read Workspace reads, posts, drafts, and media uploads. Default.
publish read, plus publish, schedule, cancel, retry, and reconcile.
engage read, plus inbox messages and comment moderation.
ads_read read, plus ad accounts, campaigns, and insights.
ads_manage ads_read and read, plus paused ad writes and de-escalation.

ads_spend is not an API-key scope. Only a signed-in owner can activate spend, increase a budget, write a spend policy, or clear a kill switch.

Workspace administration, provider connections, and key management require a signed-in owner. Keep the key secret; PubNio stores only its hash.

Type to search…

↑↓ navigate↵ selectEsc close