Journeys

Publish a journey (Preview)

Preview · Available to selected organizations. Publishes the draft as the next immutable version; new runs start on it and existing runs stay on the version they entered.

POST
/v1/journeys/{id}/publish

Publishes the draft as the next immutable version; new runs start on it and existing runs stay on the version they entered. The request names the revision it read; a stale revision returns 409. Publishing a draft identical to the newest version changes nothing. A draft journey becomes active; a paused journey stays paused. A published version sends and updates tags as its publisher, so a draft with a send_email node requires a key that can send email and one with an update_tags node requires contacts:update; without them the request returns 403.

x-api-key<token>

In: header

Path Parameters

id*string
Match^jrny_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

revision*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/journeys/string/publish" \  -H "Content-Type: application/json" \  -d '{    "revision": "string"  }'
{  "id": "string",  "name": "string",  "status": "draft",  "revision": "string",  "draft": {    "trigger": {      "type": "event",      "eventName": "string"    },    "rootNodeId": "string",    "nodes": {      "property1": {        "type": "send_email",        "config": {          "template": "string",          "senderId": "string",          "templateData": {            "property1": "string",            "property2": "string"          }        },        "next": [          {            "nodeId": "string"          }        ]      },      "property2": {        "type": "send_email",        "config": {          "template": "string",          "senderId": "string",          "templateData": {            "property1": "string",            "property2": "string"          }        },        "next": [          {            "nodeId": "string"          }        ]      }    },    "goal": {      "eventName": "string"    },    "reentry": true  },  "publishedVersion": -9007199254740991,  "publishedAt": "string",  "createdAt": "string",  "updatedAt": "string"}

Related documentation