Skip to main content
Version: 25.03

Journey Engine - Approval Queue

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​

/o/journey-engine/approval-queue

Overview​

Returns all journeys of the app that are waiting for approval, oldest submission first. Use Approve or Reject Journey to decide on them.

Authentication​

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

Permissions​

  • Required permission: Read on the journey_engine feature.
  • Additional rule: the member must be an approver (journey_approver) or a global admin. Other members get 403.

Request Parameters​

ParameterTypeRequiredDescription
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.
app_idStringYesApp ID.

Examples​

Read the approval queue​

/o/journey-engine/approval-queue?api_key=YOUR_API_KEY&app_id=6991c75b024cb89cdc04efd2

Response​

Success Response​

{
"result": [
{
"_id": "67164f4a1f1bd90d6354430a",
"name": "Welcome journey",
"appId": "6991c75b024cb89cdc04efd2",
"status": "pending_approval",
"created": 1760000000000,
"approval": {
"versionId": "67164f4a1f1bd90d6354430b"
},
"version": {
"_id": "67164f4a1f1bd90d6354430b",
"status": "draft",
"version": 2,
"blockCount": 6
}
}
]
}

Response Fields​

FieldTypeDescription
resultArrayJourneys with the status pending_approval. Empty when none are waiting.
result[]._idStringJourney definition ID.
result[].nameStringJourney name.
result[].appIdStringApp ID.
result[].statusStringAlways pending_approval.
result[].createdNumberCreation time.
result[].approvalObjectApproval details stored with the journey, including the submitted versionId.
result[].versionObjectThe submitted version: _id, status, version and blockCount (number of blocks). Missing if the version cannot be found.

Error Responses​

  • 403
{
"result": "You do not have permission to view the approval queue"
}
  • 500
{
"result": "Failed to fetch approval queue"
}

Behavior​

  • Only journeys of the given app are returned.
  • Read-only. Nothing is modified.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.membersAuthentication and permission checkReads the member and approver flag.
countly.journey_definitionPending journeysReads journeys with the status pending_approval.
countly.journey_versionsSubmitted versionReads the version's status, number and block count.