Skip to main content
GET
View journey stats
Beta. The Journeys API is in beta. Endpoints and response fields can still change.

Overview

Retrieve performance stats for a single Journey by its UUID. The response has four parts:
  • Journey-level counts: started, completed, and exited_early.
  • A nodes map of per-node counts, keyed by node id.
  • A branches map of per-branch counts, keyed by branch id.
  • A message_stats object on each message-sending node with that channel’s delivery stats.
These are the same numbers shown in the journey report in the dashboard.
The response is stats-only and carries no definition detail. Fetch the journey with View journey and join the two by id to pair each count with the node or branch it describes.

How to use this API

Authenticate with your App API Key. The authenticated key must have permission to view journeys. Find a journey’s id from the View journeys API or in the dashboard URL when viewing the journey.
Stats are all-time totals. The endpoint takes no query parameters, so there is no date range or granularity option. A successful request returns 200 OK. Channel keys live under message_stats.totals, not on message_stats itself:

Journey-level counts

A journey in draft returns the endpoint’s normal shape with zeroed counts.

Node stats

nodes is an object keyed by node id, not an array. Every node in the graph is included, at any nesting depth, so nodes nested inside a branching node’s branches appear as top-level entries in this map alongside their parent.

Branch stats

branches is an object keyed by branch id, covering the branches of every split_range, yes_no, and wait_until node. Each entry has a single field, completed, counting the users who took that branch. The map is empty for a journey with no branching nodes.

Message stats by channel

message_stats is present on send_push, send_email, send_sms, send_iam, and send_webhook nodes only. Its totals keys depend on the channel. The Dashboard term column below is the label the same metric carries in the dashboard, so you can look it up in the metrics glossary.
The View message API names these two fields differently for backward compatibility: its failed means unsubscribed and its errored means delivery errors. This endpoint uses the plain names instead, so failed here is the dashboard’s Failed.
Node-level message stats are tracked from 2023-08-20 onward. message_stats for a journey activated before that date can be incomplete.

Reconciling the counts

waiting, completed, and exited_early are separate buckets on each node, so a user is counted in exactly one of them per node. A node’s completed therefore excludes users who exited early from it, and users still held at the node are not counted as completed. Node counts do not have to sum to the journey-level counts. started counts journey entries, while a user can pass through many nodes, and a re-entering user is counted again on each pass.

Error responses

Coded errors use the shape { "errors": [{ "code", "title", "meta" }] }.

Headers

Authorization
string
default:Key YOUR_APP_API_KEY
required

Your App API key with prefix Key. See Keys & IDs.

Path Parameters

app_id
string
default:YOUR_APP_ID
required

Your OneSignal App ID in UUID v4 format. See Keys & IDs.

id
string
default:YOUR_JOURNEY_ID
required

UUID of the journey to retrieve stats for.

Response

200

Journey-level counts plus flat, id-keyed maps of node and branch stats. Contains no definition detail; join it by id against the journey from View journey.

id
string

UUID of the journey these stats belong to.

started
integer

Users who entered the journey.

completed
integer

Users who reached the end of the journey normally.

exited_early
integer

Users who left the journey through an early exit rule.

nodes
object

Node stats keyed by node id. Includes every node in the graph, at any nesting depth.

branches
object

Branch stats keyed by branch id. Empty for a journey with no branching nodes.