Edit a launched campaign's sequence: saves version N+1
Access: an API key (or an org-wide key naming the workspace) with manage on campaigns.
Allowed: texts, subjects, fallbacks, delays, step settings, editing and adding A/B variants. Rejected (status 200, structure_changed): adding, removing, retyping or rewiring steps, moving the root, removing a variant. The full validation runs with the campaign's senders and lead-list fields (invalid). Versions are immutable; running leads read the new one at their next step. Send the sequenceVersion you loaded as expectedVersion: a save in between is 409 sequence_version_stale. Drafts and finished campaigns are 409 sequence_not_editable.
apiKeyx-api-key<token>Workspace API key (nrk_…), shown once when created
campaignId*string^[0-9a-f]{24}$application/json- body
expectedVersion*integer1 <= value <= 9007199254740991tree*Default Response
application/json- response
status*stringversion*integer1 <= value <= 9007199254740991sequenceVersionId*string^[0-9a-f]{24}$curl -X PUT 'https://api.tryzen.co/v1/campaigns/string/sequence' \ -H 'Content-Type: application/json' \ -d '{ "expectedVersion": 1, "tree": { "rootId": "string", "nodes": { "property1": { "type": "if_connected", "config": {}, "delay": { "value": 0, "unit": "hours" }, "branches": { "yes": "string", "no": "string" } }, "property2": { "type": "if_connected", "config": {}, "delay": { "value": 0, "unit": "hours" }, "branches": { "yes": "string", "no": "string" } } } }}'{ "status": "saved", "version": 1, "sequenceVersionId": "string"}Remove one sender from a campaign DELETE
**Access:** an API key (or an org-wide key naming the workspace) with manage on `campaigns`. Idempotent: adding a sender already in the campaign, or removing one that isn't, changes nothing (200). On a launched campaign the replace's rules apply (`PUT …/senders`): added senders get new leads, a removed sender's untouched leads move to the others and its contacted ones fail with `sender_removed`; 422 `no_senders` for the last one, `sender_unknown`, `sender_not_connected`, `sequence_incompatible`, `campaign_closed`. A draft only refuses `sender_unknown` and `too_many_senders` (`launch-check` reports the rest). A concurrent change is 409 `conflict`.
Export the current sequence version as JSON GET
**Access:** an API key (or an org-wide key naming the workspace) with view on `campaigns`. A versioned document (`format: notreach.sequence`, `v: 1`) that `POST …/sequence/import` reads in any workspace. Not for draft or scheduled campaigns (409 `sequence_not_exportable`).