Campaigns
Create, fill and run multi-step LinkedIn outreach campaigns over the ConnectSafely API, CLI and MCP server. Every campaign is created in DRAFT with a ready default flow — nothing sends until you start it.
A campaign runs a flow (an ordered sequence of LinkedIn steps) against an audience,
from one or more of your accounts. The same surface is available three ways — the REST
API under /v1/campaigns, the connectsafely CLI, and the MCP server — with identical
operation names.
Two rules that never change
A campaign is created in DRAFT. Nothing sends until you start it. Creating, updating
and adding people never send outreach. start-campaign (and resuming a paused run) is the
one deliberate action that does.
One call is usually enough. create-campaign attaches a proven default flow and a
sensible schedule automatically, so a new campaign is ready to launch as-is. You only
author a flow to customize it.
Lifecycle
# 1. Create — DRAFT, default flow attached. workspaceId is optional when your key has one.
connectsafely create-campaign \
--name "Q1 — Seed founders" \
--workspace-id "$WS" \
--list-id "$LIST" \
--linked-in-account-ids "$ACC"
# 2. Add people — up to 500 per call, by linkedinUrl or publicId
connectsafely add-campaign-contacts --id "$CAMP" \
--contacts '[{"publicId":"ada-lovelace"},{"linkedinUrl":"https://www.linkedin.com/in/grace-hopper"}]'
# 3. Launch — this SENDS. The CLI requires --yes when non-interactive.
connectsafely start-campaign --id "$CAMP" \
--timezone "Asia/Kolkata" --active-days '[1,2,3,4,5]' --active-start 09:00 --active-end 18:00 --yesOver REST the same three steps are POST /v1/campaigns, POST /v1/campaigns/{id}/contacts
and POST /v1/campaigns/{id}/runs. Every operation authenticates with your API key
(Authorization: Bearer <key>).
Operations
| Operation | Method & path | What it does |
|---|---|---|
create-campaign | POST /v1/campaigns | Create a DRAFT (default flow attached). Clone with { sourceId }. |
list-campaigns | GET /v1/campaigns | List campaigns in the workspace. |
get-campaign | GET /v1/campaigns/{id} | One campaign, with its workflow, sources and counts. |
update-campaign | PATCH /v1/campaigns/{id} | Change settings. Most fields lock once a run is active. |
delete-campaign | DELETE /v1/campaigns/{id} | Delete (blocked while a run is active). |
add-campaign-contacts | POST /v1/campaigns/{id}/contacts | Add people (≤500/call). The workhorse call. |
list-campaign-contacts | GET /v1/campaigns/{id}/contacts | The enrolled people. |
update-campaign-contact | PATCH /v1/campaigns/{id}/contacts/{campaignContactId} | Select/deselect, override data. |
remove-campaign-contact | DELETE /v1/campaigns/{id}/contacts/{contactId} | Remove one person. |
remove-campaign-contacts | DELETE /v1/campaigns/{id}/contacts | Bulk remove ({ contactIds }). |
add-campaign-source / remove-campaign-source | POST/DELETE /v1/campaigns/{id}/sources[/{sourceId}] | Manage audience sources. |
get-campaign-flow | GET /v1/campaigns/{id}/flow | Read the flow and its steps. |
replace-campaign-flow | PUT /v1/campaigns/{id}/flow | Author the flow (full replace). |
start-campaign | POST /v1/campaigns/{id}/runs | Launch — sends. Creates a run, flips to ACTIVE. |
set-campaign-run-state | PATCH /v1/campaigns/runs/{runId} | Pause / resume / cancel (ACTIVE resumes — it sends). |
list-campaign-runs / get-campaign-run | GET /v1/campaigns/{id}/runs, /v1/campaigns/runs/{runId} | Run status, per-run prospectBreakdown, latest-worked prospects. |
get-campaign-run-funnel | GET /v1/campaigns/runs/{runId}/funnel | Per-step conversion funnel (visited → connected → replied) + headline totals. |
get-campaign-run-timeseries | GET /v1/campaigns/runs/{runId}/timeseries | Daily sends/replies (range=7d|30d|90d, default 30d). |
Field-level request/response reference for each endpoint is in the API reference. To customize the step sequence, see Authoring a flow.
