Export the current sequence version as JSON
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).
apiKeyx-api-key<token>Workspace API key (nrk_…), shown once when created
campaignId*string^[0-9a-f]{24}$Default Response
application/json- response
format*stringv*numberexportedAt*string^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$date-timesource?tree*curl -X GET 'https://api.tryzen.co/v1/campaigns/string/sequence/export'{ "format": "notreach.sequence", "v": 1, "exportedAt": "2019-08-24T14:15:22Z", "source": { "campaignName": "string", "version": 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" } } } }}Edit a launched campaign's sequence: saves version N+1 PUT
**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`.
Replace a draft's sequence with an exported one POST
**Access:** an API key (or an org-wide key naming the workspace) with manage on `campaigns`. Drafts only. References that belong to the source workspace (static voice recordings, email-tool destinations) are cleared and listed in `flags`, as are variables this campaign's leads don't have; nothing is dropped silently. The tree is saved through auto-save's compare-and-set: send the draft's `revision` and a fresh `saveKey`. `rejected`, `conflict` and `not_draft` are answers (status 200).