v53

OpenAPI 3.0.1raw.githubusercontent.com2026-07-31147343479.6 KB
Journeys

Invoke a journey

Starts a journey run for one user and returns a runId. Runs execute asynchronously, so the response arrives before any message is sent.

post/journeys/{templateId}/invoke

Path parameters

templateIdstring required

A unique identifier representing the journey to be invoked. Accepts a Journey ID or Journey Alias.

Headers

Idempotency-Keystring

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.

x-idempotency-expirationstring

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.

Request body

user_idstring

A unique identifier for the user. If not provided, the system will attempt to resolve the user identifier from profile or data objects.

profileobject

Profile data for the user. Can contain contact information (email, phone_number), user identifiers (user_id, userId, anonymousId), or any custom profile fields. Profile fields are merged with any existing stored profile for the user. Include context.tenant_id to load a tenant-scoped profile for multi-tenant scenarios.

dataobject

Data payload passed to the journey. The expected shape can be predefined using the schema builder in the journey editor. This data is available in journey steps for condition evaluation and template variable interpolation. Can also contain user identifiers (user_id, userId, anonymousId) if not provided elsewhere.

Response

Journey invocation accepted

runIdstring required

A unique identifier for the journey run that was created.