Create a Journey
Creates a journey from a set of nodes, in draft state unless you pass a published state. Send nodes cannot be included until their templates exist.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
A unique key that makes this request idempotent. If Courier receives another request with the same Idempotency-Key, it returns the stored response from the first request without performing the operation again (including the original status code and any error). Use it to safely retry POST requests after network failures without risking duplicate sends. The key is scoped to this endpoint.
How long the idempotency key remains valid, as a Unix epoch timestamp in seconds or an ISO 8601 date string. Only applies when Idempotency-Key is provided. If omitted, the key is retained for 25 hours; the maximum is 1 year.
Body
Request body for creating a journey.
11A single node in a journey DAG. Discriminated by type, with a secondary discriminator on some variants (trigger_type for trigger, mode for delay, method for fetch, scope for throttle).
- API Invoke Trigger
- Segment Trigger
- Audience Trigger
- Webhook Trigger
- Send
- Delay for Duration
- Delay Until
- Fetch (GET/DELETE)
- Fetch (POST/PUT)
- AI
- Throttle (Static)
- Throttle (Dynamic)
- Batch
- Send to Digest
- Exit
- JourneyBranchNode
Lifecycle state of a journey.
DRAFT, PUBLISHED Cancelation token stored on the journey definition. It tags every run the journey creates so that POST /journeys/cancel can later cancel those runs by token. Accepts a templated string such as order-{{data.order_id}}, which is resolved per run when the journey is invoked. On a replace, omitting this field preserves any existing token and sending a value replaces it.
1"order-{{data.order_id}}"
Response
Journey created
A journey, with its current draft or published nodes and metadata.
Lifecycle state of a journey.
DRAFT, PUBLISHED A single node in a journey DAG. Discriminated by type, with a secondary discriminator on some variants (trigger_type for trigger, mode for delay, method for fetch, scope for throttle).
- API Invoke Trigger
- Segment Trigger
- Audience Trigger
- Webhook Trigger
- Send
- Delay for Duration
- Delay Until
- Fetch (GET/DELETE)
- Fetch (POST/PUT)
- AI
- Throttle (Static)
- Throttle (Dynamic)
- Batch
- Send to Digest
- Exit
- JourneyBranchNode
The journey cancelation token, or null when none is set. A token authored in the dashboard is returned in its raw templated form, such as order-{{data.order_id}}, so it can be read back and asserted.
"order-{{data.order_id}}"