TryzenAPI
Campaigns

Edit a launched campaign's sequence: saves version N+1

PUT
/v1/campaigns/{campaignId}/sequence

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.

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
expectedVersion*integer
Range1 <= value <= 9007199254740991
tree*

Response Body

Default Response

application/json
  1. response
status*string
version*integer
Range1 <= value <= 9007199254740991
sequenceVersionId*string
Match^[0-9a-f]{24}$
Example Request
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"        }      }    }  }}'
Example Response
{  "status": "saved",  "version": 1,  "sequenceVersionId": "string"}