Add leads to a launched campaign
Access: an API key (or an org-wide key naming the workspace) with manage on campaigns.
Batch: through an API key, leads holds at most 100 items.
Up to 100 people, each a LinkedIn profile URL, vanity, member URN or workspace lead id (a new person becomes a workspace lead, source api), optionally pinned to one of the campaign's senders. Each joins the campaign's list and the campaign enrolls it like any lead: sender rotation, the campaign's exclusions (blacklist, contacted elsewhere) and one entry per person apply; sender ownership does not. For in-progress, paused and finished campaigns (409 campaign_not_accepting_leads; 409 campaign_list_busy while its list is importing or another list is being added). A finished campaign whose end date has passed can't be resumed, so it takes no leads: 409 campaign_ended, nothing is added and no lead is created (extend its end date with the schedule endpoint, or duplicate it, to run it again). A paused one past its end date still takes them: move its end date, then resume. resumePaused / resumeFinished resume the campaign when at least one lead went in; a refused resume is reported in resumeRefusal (no_connected_sender, end_date_passed, campaign_changed) and the leads stay added. Repeats are idempotent: a lead already in the campaign or its list is already_in_campaign. Per-lead failures (target_invalid, lead_not_found, sender_not_in_campaign) don't fail the request; a pin to a sender outside the campaign is checked first and creates no lead.
apiKeyx-api-key<token>Workspace API key (nrk_…), shown once when created
campaignId*string^[0-9a-f]{24}$application/json- body
leads*array<>1 <= items <= 100resumePaused?booleanfalseresumeFinished?booleanfalseDefault Response
application/json- response
added*integer0 <= value <= 9007199254740991alreadyInCampaign*integer0 <= value <= 9007199254740991failed*integer0 <= value <= 9007199254740991items*array<>status*string"draft""scheduled""starting""in_progress""paused""finished""canceled""failed"resumed*booleanresumeRefusal*|nullcurl -X POST 'https://api.tryzen.co/v1/campaigns/string/leads' \ -H 'Content-Type: application/json' \ -d '{ "leads": [ { "lead": { "profileUrl": "string" } } ]}'{ "added": 0, "alreadyInCampaign": 0, "failed": 0, "items": [ { "index": 0, "outcome": "added", "leadId": "string", "code": "target_invalid", "message": "string" } ], "status": "draft", "resumed": true, "resumeRefusal": { "code": "end_date_passed", "message": "string" }}One page of the campaign's leads GET
**Access:** an API key (or an org-wide key naming the workspace) with view on `campaigns`. Keyset paging in enrollment order: pass `nextCursor` as `after`, `prevCursor` as `before` (opaque ids). Filters repeat a key for several values (`status=failed&status=paused`). `search` looks at the lead's name, headline, company and profile URL, ignoring case and accents. `total` counts the matches across all pages.
Add a list's leads to a launched campaign POST
**Access:** an API key (or an org-wide key naming the workspace) with manage on `campaigns`. Every member of the list joins the campaign's own list (the ones already in are kept as they are) and the campaign enrolls them like any lead. Same statuses, resume flags and `resumeRefusal` as adding leads, and the same 409 `campaign_ended` for a finished campaign whose end date has passed (nothing is copied); the campaign's list is held while the members are copied (a concurrent add is 409 `campaign_list_busy`). 409 `source_list_not_found`, `source_list_not_people`, `source_list_busy`, `source_list_is_campaign_list`. Idempotent: adding the same list again adds 0. A list shared by several campaigns gives the leads to each of them.