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

# campaign.started

> Triggered when a campaign is started

This event is triggered when a campaign begins execution, either from initial launch or when resuming from a paused state.

## When This Event Fires

* A new campaign is launched
* A campaign begins processing leads
* Campaign transitions to `STARTED` status

## Payload

```json theme={null}
{
  "eventId": "evt_1708456789123_abc123def",
  "eventType": "campaign.started",
  "timestamp": "2024-02-24T10:30:00.000Z",
  "workspaceId": "ws_abc123xyz",
  "data": {
    "campaignId": "camp_xyz789",
    "campaignName": "Q1 Tech Founders Outreach",
    "totalLeads": 150,
    "startedAt": "2024-02-24T10:30:00.000Z"
  }
}
```

## Payload Fields

| Field | Type | Description |
| - | - | - |
| `eventId` | string | Unique event identifier for idempotency |
| `eventType` | string | Always `campaign.started` |
| `timestamp` | string | ISO 8601 timestamp when the event occurred |
| `workspaceId` | string | Your workspace ID |
| `data.campaignId` | string | Unique campaign identifier |
| `data.campaignName` | string | Human-readable campaign name |
| `data.totalLeads` | number | Total number of leads in the campaign |
| `data.startedAt` | string | ISO 8601 timestamp when the campaign started |

## Use Cases

> **Campaign Monitoring**
>
> Track when campaigns go live

> **Team Notifications**
>
> Alert team members that outreach has begun

> **Reporting**
>
> Log campaign start times for analytics

> **Resource Planning**
>
> Track active campaigns for capacity planning

## Example Handler

```javascript theme={null}
app.post('/webhooks/sendpilot', async (req, res) => {
  const event = req.body;
  
  if (event.eventType === 'campaign.started') {
    const { campaignId, campaignName, totalLeads, startedAt } = event.data;
    
    // Notify team
    await slack.postMessage({
      channel: '#campaigns',
      text: `🚀 Campaign started!\n` +
            `Name: ${campaignName}\n` +
            `Leads: ${totalLeads}\n` +
            `Started at: ${startedAt}`
    });
    
    // Log for analytics
    await analytics.track('campaign_started', {
      campaignId,
      campaignName,
      totalLeads
    });
    
    console.log(`Campaign ${campaignName} started with ${totalLeads} leads`);
  }
  
  res.status(200).send('OK');
});
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.