TryzenAPI
Campaigns

Add leads to a launched campaign

POST
/v1/campaigns/{campaignId}/leads

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.

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
leads*array<>
Items1 <= items <= 100
resumePaused?boolean
Defaultfalse
resumeFinished?boolean
Defaultfalse

Response Body

Default Response

application/json
  1. response
added*integer
Range0 <= value <= 9007199254740991
alreadyInCampaign*integer
Range0 <= value <= 9007199254740991
failed*integer
Range0 <= value <= 9007199254740991
items*array<>
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' \  -H 'Content-Type: application/json' \  -d '{  "leads": [    {      "lead": {        "profileUrl": "string"      }    }  ]}'
Example Response
{  "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"  }}