Replace a campaign's schedule, also after launch
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.
apiKeyx-api-key<token>Workspace API key (nrk_…), shown once when created
campaignId*string^[0-9a-f]{24}$application/json- body
schedule*Default Response
application/json- response
schedule*status*string"draft""scheduled""starting""in_progress""paused""finished""canceled""failed"changed*booleanwarnings*array<>curl -X PUT 'https://api.tryzen.co/v1/campaigns/string/schedule' \ -H 'Content-Type: application/json' \ -d '{ "schedule": { "tz": "string", "days": [ "mon" ], "from": "string", "to": "string", "startDate": "string", "endDate": "string" }}'{ "schedule": { "tz": "string", "days": [ "mon" ], "from": "string", "to": "string", "startDate": "string", "endDate": "string" }, "status": "draft", "changed": true, "warnings": [ { "code": "not_draft", "severity": "error", "field": "status", "message": "string" } ]}Cancel a campaign POST
**Access:** an API key (or an org-wide key naming the workspace) with manage on `campaigns`. Scheduled, Starting, In progress or Paused → Canceled, for good. Every open lead is stopped and nothing more is sent. A move the status machine doesn't allow is 409 `campaign_transition_refused`.
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.