Replace the sequence
Replaces the WHOLE sequence tree of the campaign. Always GET the campaign first, modify the steps object and send the complete tree back. The campaign must not be RUNNING (pause it first). Missing step and version _ids are generated by the server; keep existing ids on a campaign that already ran, otherwise history, statistics and the position of contacts in the sequence are lost and contacts may receive steps again. Content is not validated here: empty email versions, missing subjects or audio are only reported by POST .../start.
Authorization
apiKey Your 48 character API key, sent as is (a Bearer prefix is tolerated). Create it at https://v3.emelia.io/settings/api.
In: header
Path Parameters
Identifier of a multichannel campaign (24 hexadecimal characters), as returned by POST /advanced/campaigns or GET /advanced/campaigns.
^[0-9a-fA-F]{24}$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/advanced/campaigns/6650f1a2b839d80011c5a0f1/steps" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "steps": { "_id": "START", "stepType": "START", "identities": [], "delay": { "amount": 0, "unit": "DAYS" }, "next": { "stepType": "CONNECTION", "identities": [], "delay": { "amount": 0, "unit": "DAYS" }, "versions": [ { "message": "Hi {{firstName}}, glad to connect." } ], "next": { "stepType": "CONDITION", "identities": [], "delay": { "amount": 3, "unit": "DAYS" }, "conditions": { "field": "ACCEPTED", "operator": "EQUAL", "value": "true" }, "yes": { "stepType": "MESSAGE", "identities": [], "delay": { "amount": 1, "unit": "HOURS" }, "versions": [ { "message": "Thanks for connecting {{firstName}}!" } ] }, "no": { "stepType": "EMAIL", "identities": [], "delay": { "amount": 2, "unit": "HOURS" }, "versions": [ { "subject": "Quick question, {{firstName}}", "message": "<p>Hi {{firstName}},</p><p>I sent you an invitation on LinkedIn...</p>" } ], "next": { "stepType": "END_OF_CAMPAIGN", "identities": [], "delay": { "amount": 0, "unit": "DAYS" } } } } } } }'{ "success": true}