One page of the campaign's leads
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.
apiKeyx-api-key<token>Workspace API key (nrk_…), shown once when created
campaignId*string^[0-9a-f]{24}$status?|array<>senderId?|array<>failureCode?|array<>search?stringafter?stringbefore?stringlimit?numberDefault Response
application/json- response
rows*array<>items <= 100total*integer0 <= value <= 9007199254740991nextCursor*|nullprevCursor*|nullcurl -X GET 'https://api.tryzen.co/v1/campaigns/string/leads'{ "rows": [ { "id": "string", "lead": { "id": "string", "firstName": "string", "lastName": "string", "headline": "string", "companyName": "string", "profileUrl": "string" }, "status": "pending", "replied": true, "failure": { "code": "string", "message": "string", "at": "2019-08-24T14:15:22Z" }, "exclusion": { "reason": "string" }, "sender": { "id": "string", "name": "string" }, "currentStep": { "nodeId": "string", "type": "if_connected" }, "hold": { "reason": "string", "since": "2019-08-24T14:15:22Z" }, "enrolledAt": "2019-08-24T14:15:22Z", "lastActivityAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z" } ], "total": 0, "nextCursor": "string", "prevCursor": "string"}Replace a campaign's schedule, also after launch PUT
**Access:** an API key (or an org-wide key naming the workspace) with manage on `campaigns`. The whole schedule (time zone, days, hours, start and end date). Drafts, scheduled, starting, running and paused campaigns; canceled and failed ones, and finished ones whose end date is still ahead, are 422 `campaign_closed` (sending a finished campaign's current schedule back unchanged is a no-op). A finished campaign whose end date has passed may extend its end date, and change nothing else: a later end date than today in the campaign's time zone (422 `end_date_not_later` otherwise, also for no end date), every other field as it is (422 `only_end_date_editable`, each changed field in `error.problems` as `field_locked`). It stays finished: resume it, or add leads with `resumeFinished`. The start date is locked once the campaign started (422 `start_date_locked`: send it back unchanged). An invalid schedule is 422 `schedule_invalid` with every issue in `error.problems`; warnings come back in `warnings`. A running campaign's senders get the new window within seconds; a scheduled one starts on the new date. A concurrent settings write is 409 `conflict`.
Add leads to a launched campaign POST
**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.