# POST /lead-gen/initiatives/dispatcher/run

**Resource:** [Lead Generation](./lead-gen.md)  
**Scopes:** `lead-gen:write`  
**Write operation:** yes

Manually trigger the initiative dispatcher for your workspace. The dispatcher processes all due enrolment tasks: sends emails, SMS messages, and staff notifications for active initiatives. Under normal operation this runs automatically via cron. Use this endpoint to trigger an immediate processing cycle, for testing, or to catch up after a pause. Returns a summary of tasks processed.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `initiative_id` | body | uuid | no | Limit dispatch to a single initiative. Omit to process all active initiatives. |
| `dry_run` | body | boolean | no | If true, simulate processing without sending anything (default: false) |

## Request example

```bash
curl -X POST \
  "https://api.trustpager.com/functions/v1/api/v1/lead-gen/initiatives/dispatcher/run" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Response example

```json
{
  "tasks_processed": 12,
  "tasks_sent": 10,
  "tasks_skipped": 2,
  "runs": [
    { "enrolment_id": "e1...", "step": 1, "action": "send_gmail_email", "status": "sent" },
    { "enrolment_id": "e2...", "step": 1, "action": "send_sms", "status": "sent" }
  ]
}
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`