Journey Engine - Journeys Publish
Endpoint
/i/journey-engine/journeys/publish
Ⓔ Enterprise Only
This API is available exclusively in Countly Enterprise.
Overview
Publish or unpublish a journey version. Publishing activates a version; unpublishing deactivates it.
Authentication
- Authentication methods:
- API Key (parameter):
api_key=YOUR_API_KEY - Auth Token (parameter):
auth_token=YOUR_AUTH_TOKEN - Auth Token (header):
countly-token: YOUR_AUTH_TOKEN
- API Key (parameter):
Permissions
- Required permission:
Updateon thejourney_enginefeature
Request Parameters
Request body JSON:
journeyId(required): Journey definition IDversionId(required): Journey version IDstatus(optional):"active"or"draft"(defaults to active)
Response
Success Response
{
"journeyDefinitionId": "67164f4a1f1bd90d6354430a",
"id": "67164f4a1f1bd90d6354430b",
"status": "active"
}
Response Fields
| Field | Type | Description |
|---|---|---|
journeyDefinitionId | String | Journey definition ID from the request. |
id | String | Journey version ID from the request. |
status | String | active when publishing, draft when unpublishing. |
Error Responses
- 400: Invalid blocks or request
- 404: Version not found
- 500: Publish error
Examples
Publish a version
POST /i/journey-engine/journeys/publish
Content-Type: application/json
{
"journeyId": "67164f4a1f1bd90d6354430a",
"versionId": "67164f4a1f1bd90d6354430b",
"status": "active"
}
Unpublish a version (set to draft)
POST /i/journey-engine/journeys/publish
Content-Type: application/json
{
"journeyId": "67164f4a1f1bd90d6354430a",
"versionId": "67164f4a1f1bd90d6354430b",
"status": "draft"
}
Behavior/Processing
- Loads the target version and returns
Version not foundif it does not exist. - Validates version blocks before publishing. Invalid blocks return a 400 with the validation error message.
- Updates the journey definition status to
activewhenstatus=activeor omitted; otherwise updates it todraft. - Publishing calls version activation, which sets all versions for the journey definition to
draft, clears content queue entries for previously active versions, then marks the selected versionactive. - Unpublishing marks the selected version
draftand clears its content queue. - Emits
journey_publishedorjourney_unpublishedsystem log actions.
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly.journey_definition | Endpoint data source | Stores endpoint-related records this endpoint reads or modifies. |
countly.journey_versions | Endpoint data source | Stores endpoint-related records this endpoint reads or modifies. |
Related Endpoints
- No related endpoints
Ⓔ Enterprise
This feature is part of Countly Enterprise.
Get Access:
Already a Customer? Use support portal if you have any questions
Last Updated
2026-04-18