---
title: "Turn on an ad account kill switch"
description: "PubNio API ads.enableKillSwitch: turn on an ad account kill switch. 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.

# Turn on an ad account kill switch

Turn on an ad account kill switch with [`POST /api/v1/ads/accounts/{accountId}/kill-switch`](https://pubnio.com/api/v1/docs#tag/ads/POST/api/v1/ads/accounts/{accountId}/kill-switch). Requires an API key with the `ads_manage` scope or a signed-in workspace member.

## Request

Stores every active, activating, and pending-review campaign, ad group, and ad as paused and queues a retryable provider pause for each (one per campaign; an ad group or ad only when its campaign is not paused). providerPauses.unsupported counts entities the provider cannot pause here; pause those in the provider's ads manager. While the switch is on, a sync cannot restore an active status and queues another pause for anything the provider still reports as spending, and no activation, resume, or budget increase passes. Turning it on only stops spend, so members and ads_manage keys may; clearing it is the owner-only ads.clearKillSwitch. Repeating the current state is idempotent.

| Parameter     | In    | Type | Required |
| ------------- | ----- | ---- | -------- |
| `accountId`   | path  | UUID | Yes      |
| `workspaceId` | query | UUID | Yes      |

| Body field | Type   | Required |
| ---------- | ------ | -------- |
| `reason`   | string | No       |

## Response

- HTTP 200: `AdKillSwitchResult` with `policy`, `changed`, `paused`, `providerPauses`, `nextAction`.

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const result = await workspace.ads.enableKillSwitch(accountId, {
  reason: "Creative review",
});
```

### Python

```python
result = workspace.ads.enable_kill_switch(account_id, reason="Creative review")
```

### cURL

```sh
curl -X POST "https://pubnio.com/api/v1/ads/accounts/$ACCOUNT_ID/kill-switch?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Creative review"}'
```

### CLI

```sh
pnio ads enable-kill-switch "$ACCOUNT_ID" --reason "Creative review"
```

### MCP execute

```js
async () => {
  const accountId = "<accountId>";
  const response = await codemode.request({
    method: "POST",
    path: `/api/v1/ads/accounts/${accountId}/kill-switch`,
    query: { workspaceId: codemode.workspaceId },
    body: { reason: "Creative review" },
  });
  return response.data;
};
```

## Errors

It declares no problem of its own.

It declares the problems [every Ads operation](https://pubnio.com/docs/reference/#ads) and [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

- Field lengths and ranges are in the [OpenAPI document](https://pubnio.com/api/v1/openapi).

## Related

- [Ads operations](https://pubnio.com/docs/reference/#ads)

Source: https://pubnio.com/docs/reference/ads-enable-kill-switch/index.mdx
