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

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable or disable a publishing destination

Enable or disable a publishing destination with [`POST /api/v1/integrations`](https://pubnio.com/api/v1/docs#tag/integrations/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](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

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

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

### Python

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

### cURL

```sh
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}'
```

### CLI

```sh
pnio integrations disable "$ACCOUNT_ID"
```

Also: `pnio integrations enable`.

### MCP execute

```js
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](https://pubnio.com/docs/reference/#shared-problems) 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.

## Related

- [Connected accounts operations](https://pubnio.com/docs/reference/#connected-accounts)
- [Accounts and connections](https://pubnio.com/docs/accounts/)

Source: https://pubnio.com/docs/reference/integrations-set-enabled/index.mdx
