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:
Readon thejourney_enginefeature. - Additional rule: the member must be an approver (
journey_approver) or a global admin. Other members get403.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | String | Conditional | Required if auth_token is not provided. |
auth_token | String | Conditional | Required if api_key is not provided. |
app_id | String | Yes | App 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
| Field | Type | Description |
|---|---|---|
result | Array | Journeys with the status pending_approval. Empty when none are waiting. |
result[]._id | String | Journey definition ID. |
result[].name | String | Journey name. |
result[].appId | String | App ID. |
result[].status | String | Always pending_approval. |
result[].created | Number | Creation time. |
result[].approval | Object | Approval details stored with the journey, including the submitted versionId. |
result[].version | Object | The 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.
Related Endpoints
Implementation details
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly.members | Authentication and permission check | Reads the member and approver flag. |
countly.journey_definition | Pending journeys | Reads journeys with the status pending_approval. |
countly.journey_versions | Submitted version | Reads the version's status, number and block count. |