TryzenAPI
Campaigns

Add a list's leads to a launched campaign

POST
/v1/campaigns/{campaignId}/leads/from-list

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.

Authorization

apiKey
headerx-api-key<token>

Workspace API key (nrk_…), shown once when created

Path Parameters

campaignId*string
Match^[0-9a-f]{24}$

Request Body

application/json
  1. body
listId*string
Match^[0-9a-f]{24}$
resumePaused?boolean
Defaultfalse
resumeFinished?boolean
Defaultfalse

Response Body

Default Response

application/json
  1. response
added*integer
Range0 <= value <= 9007199254740991
status*string
Value in"draft""scheduled""starting""in_progress""paused""finished""canceled""failed"
resumed*boolean
resumeRefusal*|null
Example Request
curl -X POST 'https://api.tryzen.co/v1/campaigns/string/leads/from-list' \  -H 'Content-Type: application/json' \  -d '{  "listId": "string"}'
Example Response
{  "added": 0,  "status": "draft",  "resumed": true,  "resumeRefusal": {    "code": "end_date_passed",    "message": "string"  }}

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.

Counts over all of the campaign's leads: per status, reason and sender GET

**Access:** an API key (or an org-wide key naming the workspace) with view on `campaigns`. Unfiltered, for the status strip and the filter menus. Failure codes are canonical (an old spelling counts as the current one), most frequent first.