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

# Campaigns

> Send bulk messages to contact groups with scheduling and pause controls

# Broadcast Campaigns

Use campaigns to message many contacts at once with a template or custom content, optional scheduling, and live progress tracking.

## Create a campaign in the dashboard

<Steps>
  <Step title="Start a campaign">
    Open **Campaigns** and click **New Campaign**.
  </Step>

  <Step title="Choose your audience">
    Pick a contact group or a custom list of contacts.
  </Step>

  <Step title="Write the message">
    Use a template with variables such as `{{name}}`, or write custom text/media content.
  </Step>

  <Step title="Send or schedule">
    Send immediately, or schedule a start time. You can pause, resume, or cancel a running campaign later.
  </Step>
</Steps>

## Use campaigns from the API

Authenticate with an API key that can manage campaigns, then call:

| Action         | Method  | Endpoint                         |
| :------------- | :------ | :------------------------------- |
| List campaigns | `GET`   | `/api/v1/campaigns`              |
| Create a draft | `POST`  | `/api/v1/campaigns`              |
| Get progress   | `GET`   | `/api/v1/campaigns/{id}`         |
| Update a draft | `PATCH` | `/api/v1/campaigns/{id}`         |
| Start sending  | `POST`  | `/api/v1/campaigns/{id}/execute` |
| Pause          | `POST`  | `/api/v1/campaigns/{id}/pause`   |
| Resume         | `POST`  | `/api/v1/campaigns/{id}/resume`  |
| Cancel         | `POST`  | `/api/v1/campaigns/{id}/cancel`  |

Full request and response schemas are in the [API Reference](/api-reference).

### SDK example

```python theme={null}
from wazzapi import WazzapiClient

with WazzapiClient(api_key="YOUR_API_KEY") as client:
    campaign = client.campaigns.create({
        "name": "April promo",
        "whatsapp_account_id": "YOUR_DEVICE_ID",
        "recipient_type": "group",
        "recipient_group_ids": ["YOUR_GROUP_ID"],
        "custom_message": "Hi {{name}}, our sale starts today!",
    })
    client.campaigns.execute(campaign.id)
```

```ts theme={null}
import { WazzapiClient } from "@wazzapi/wazzapi";

const client = new WazzapiClient({ apiKey: process.env.WAZZAPI_API_KEY });
const campaign = await client.campaigns.create({
  name: "April promo",
  whatsapp_account_id: "YOUR_DEVICE_ID",
  recipient_type: "group",
  recipient_group_ids: ["YOUR_GROUP_ID"],
  custom_message: "Hi {{name}}, our sale starts today!",
});
await client.campaigns.execute(campaign.id);
```

<Note>
  Campaigns require a plan that includes campaign access. If create or execute fails with a plan error, upgrade in **Billing** or use a key with the right permissions.
</Note>
