Skip to main content
Version: 25.03

Delete Journey

Enterprise

This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.

Endpoint​

/i/journey-engine/delete

Overview​

Soft-deletes a journey definition and marks its versions as deleted.

Authentication​

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions​

  • Required permission: Create on the journey_engine feature

Request Parameters​

ParameterTypeRequiredDescription
api_keyStringYes (or auth_token)API key authentication
auth_tokenStringYes (or api_key)Auth token authentication
app_idStringYesApplication identifier
idStringYesJourney definition ID

Examples​

https://your-server.com/i/journey-engine/delete?api_key=YOUR_API_KEY&app_id=64afe321d5f9b2f77cb2c8ed&id=67164f4a1f1bd90d6354430a

Response​

Success Response​

{
"_id": "67164f4a1f1bd90d6354430a",
"name": "Onboarding Journey",
"status": "deleted",
"appId": "64afe321d5f9b2f77cb2c8ed"
}

Response Fields​

FieldTypeDescription
_idStringJourney definition ID
statusStringJourney status after soft-delete
nameStringJourney definition name
appIdStringApplication ID

Error Responses​

HTTP StatusResponse
500{ "result": "Failed to delete a journey" }
500{ "result": "Failed to delete an journey" }

Behavior​

  1. Reads id from query parameters.
  2. Updates all related records in journey_versions to deleted.
  3. Updates journey definition status in journey_definition to deleted.
  4. Returns the deleted journey definition document.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.journey_versionsEndpoint data source** - Marks related versions as deleted
countly.journey_definitionEndpoint data source** - Marks journey definition as deleted