Skip to main content
Version: 26.01

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​

Return the journeys of an app that are waiting for approval. Approvers and global admins see every pending journey. Other members see only the journeys they submitted themselves.

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

Request Parameters​

  • app_id (required): App ID

Examples​

GET /o/journey-engine/approval-queue?app_id=6991c75b024cb89cdc04efd2

Response​

Success Response​

{
"result": [
{
"_id": "67164f4a1f1bd90d6354430a",
"name": "Onboarding Journey",
"appId": "6991c75b024cb89cdc04efd2",
"status": "pending_approval",
"created": 1700000000000,
"approval": {},
"version": {
"_id": "67164f4a1f1bd90d6354430b",
"status": "draft",
"version": 2,
"blockCount": 5
}
}
],
"canApprove": true
}

Response Fields​

FieldTypeDescription
resultArrayJourneys pending approval, oldest submission first.
result[]._idStringJourney definition ID.
result[].nameStringJourney name.
result[].appIdStringApp ID.
result[].statusStringJourney status.
result[].createdNumberCreation timestamp.
result[].approvalObjectApproval details of the submission.
result[].versionObjectThe submitted version, with _id, status, version and blockCount (number of blocks).
canApproveBooleantrue when the member is an approver or a global admin.

Error Responses​

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

Behavior​

  • Returns only journeys of the given app with the pending approval status.
  • Members who are neither approvers nor global admins get only the journeys they submitted.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.journey_definitionEndpoint data sourceReads pending journeys.
countly.journey_versionsSubmitted version lookupReads the submitted version of each journey.