Skip to main content

Create an outreach campaign

Goal: have an agent reach out to all leads on a stage, then watch progress.

Prerequisites: an agent in the product, a connected channel, and leads on the target stage.

# 1) Create the campaign (starts in "draft")
curl -s https://api.sance.ai/v1/outreach-campaigns/ \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{ "product_id": 42, "agent_id": 3, "name": "Q3 reactivation", "outreach_to_stage_id": 7 }'

# 2) Activate it
curl -s -X POST "https://api.sance.ai/v1/outreach-campaigns/9/status/active" \
-H "Authorization: Bearer $TOKEN"

# 3) Watch dispatch — one run per targeted lead
curl -s "https://api.sance.ai/v1/outreach-campaigns/9/dispatch-runs" \
-H "Authorization: Bearer $TOKEN"

# 4) Drill into a run's individual attempts
curl -s "https://api.sance.ai/v1/outreach-campaigns/dispatch-runs/123/attempts" \
-H "Authorization: Bearer $TOKEN"

What happens next: while active, the scheduler selects eligible leads on the target stage and dispatches the agent's outreach across the configured channel/contact steps, respecting per-channel daily limits and suppression. Each lead gets a dispatch run; each contacted contact is a dispatch attempt. The campaign's list view also carries summary statistics (eligible leads, outreaches sent, replies). Pause or stop anytime by posting a new status.

See: POST /v1/outreach-campaigns/, POST /v1/outreach-campaigns/{id}/status/{new_status}, GET /v1/outreach-campaigns/{id}/dispatch-runs, GET /v1/outreach-campaigns/dispatch-runs/{run_id}/attempts.