Cancel a campaign
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.
apiKeyx-api-key<token>Workspace API key (nrk_…), shown once when created
campaignId*string^[0-9a-f]{24}$Default Response
application/json- response
status*string"draft""scheduled""starting""in_progress""paused""finished""canceled""failed"previousStatus*string"draft""scheduled""starting""in_progress""paused""finished""canceled""failed"curl -X POST 'https://api.tryzen.co/v1/campaigns/string/cancel'{ "status": "draft", "previousStatus": "draft"}Resume a paused (or finished) campaign POST
**Access:** an API key (or an org-wide key naming the workspace) with manage on `campaigns`. Paused or Finished → Starting; the campaign then moves to In progress by itself. Held leads continue with what was left of their delays. Refused (409, with the reason in `error.problems`) when none of its senders is connected (`no_connected_sender`) or when its schedule's end date has passed (`end_date_passed`; move a paused campaign's end date first, extend a finished one's). A move the status machine doesn't allow is 409 `campaign_transition_refused`.
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`.