TryzenAPI
Campaigns

Replace a draft's sequence with an exported one

POST
/v1/campaigns/{campaignId}/sequence/import

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).

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
expectedRevision*integer
Range0 <= value <= 9007199254740991
saveKey*string
Length8 <= length <= 100
document*unknown

Response Body

Default Response

application/json
  1. response
status*string
revision*integer
Range0 <= value <= 9007199254740991
savedAt*string
Match^(?:(?:\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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
Formatdate-time
flags*array<>
issues*array<>
source?
Example Request
curl -X POST 'https://api.tryzen.co/v1/campaigns/string/sequence/import' \  -H 'Content-Type: application/json' \  -d '{  "expectedRevision": 0,  "saveKey": "stringst",  "document": null}'
Example Response
{  "status": "imported",  "revision": 0,  "savedAt": "2019-08-24T14:15:22Z",  "flags": [    {      "code": "recording_not_portable",      "nodeId": "string",      "path": [        "string"      ],      "message": "string"    }  ],  "issues": [    {      "code": "invalid_schema",      "severity": "error",      "nodeId": "string",      "path": [        "string"      ],      "message": "string"    }  ],  "source": {    "campaignName": "string",    "version": 1  }}