## Pause, resume or cancel campaign

`POST https://whatsapp.paaltech.org/api/v1/businesses/{external_id}/campaigns/{id}/{action}`

`pause` stops sending after the current batch; `resume` carries on; `cancel` stops it
for good - people not reached yet are marked cancelled and messages still held for quiet
hours are withdrawn. Cancelling a repeating campaign stops its future runs.

Ability: `campaigns.manage`

### Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `external_id` | string | yes | Your own ID for the business (Multi-SKUUL - the tenant ID). Max 191 characters. Pattern `^[A-Za-z0-9._:-]+$` |
| `id` | integer | yes |  |
| `action` | string | yes | One of: `pause`, `resume`, `cancel` |

### Request

```bash
curl --request POST \
  --url 'https://whatsapp.paaltech.org/api/v1/businesses/presec/campaigns/2/action' \
  --header "Authorization: Bearer $PAALCHAT_TOKEN" \
  --header 'Accept: application/json'
```

### Responses

- **200** - Changed.
- **401** - unauthenticated - missing, invalid, revoked or expired token

```json
{
  "error": {"code": "unauthenticated", "message": "A valid product token is required."}
}
```

- **403** - missing_ability, product_suspended or product_token_required

```json
{
  "error": {
    "code": "missing_ability",
    "message": "This token does not have the ability this request needs."
  }
}
```

- **404** - not_found - not yours, or does not exist

```json
{"error": {"code": "not_found", "message": "Business not found."}}
```

- **409** - campaign_not_allowed - e.g. resuming a campaign that is not paused.
- **429** - rate_limited - over 300 requests/minute for this product

```json
{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests. Slow down and retry after the Retry-After header."
  }
}
```

