Skip to content

Enable or disable a publishing destination

PubNio API integrations.setEnabled: enable or disable a publishing destination. Request fields, examples in five clients, errors, and idempotency.

Enable or disable a publishing destination with POST /api/v1/integrations. Requires a signed-in workspace owner, in the web app or the CLI; API keys are not accepted and MCP cannot call it.

Request

Parameter In Type Required
workspaceId query UUID Yes
Body field Type Required
id UUID Yes
enabled boolean Yes

Response

  • HTTP 200: ProviderAccount with id, profileId, connectionId, provider, accountKind, parentAccountId, name, platformUserId, avatarUrl, enabled, available, details, readiness, capabilities.
    • provider: bluesky, facebook, instagram, linkedin, pinterest, reddit, snapchat, tiktok, threads, x, youtube, google_business, meta_ads, google_ads, reddit_ads, pinterest_ads, tiktok_ads, linkedin_ads, snapchat_ads, amazon_ads, openai_ads
    • accountKind: social_page, social_account, social_board, social_channel, ad_account

The OpenAPI document has each field’s type.

Examples

const account = await workspace.accounts.setEnabled({
  id: accountId,
  enabled: false,
});

Create this client with a signed-in person’s accessToken, not an apiKey.

The Python SDK authenticates with a workspace API key, which this operation does not accept, so it has no method for it.

curl -X POST "https://pubnio.com/api/v1/integrations?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id":"'"$ACCOUNT_ID"'","enabled":false}'
pnio integrations disable "$ACCOUNT_ID"

Also: pnio integrations enable.

async () => {
  const accountId = "<accountId>";
  const response = await codemode.request({
    method: "POST",
    path: "/api/v1/integrations",
    query: { workspaceId: codemode.workspaceId },
    body: { id: accountId, enabled: false },
  });
  return response.data;
};

Errors

It declares no problem of its own.

It declares the problems most operations declare.

Idempotency

No key, so a retried POST is not deduplicated. Read the current state before you retry.

Limits

  • API keys and MCP cannot call it. A signed-in person runs it from the CLI after pnio auth login or in the web app.

Type to search…

↑↓ navigate↵ selectEsc close