> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.onesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# View journey stats

> Retrieve performance stats for a single journey, including journey-level counts, per-node counts, per-branch counts, and channel delivery stats.

<Info>
  **Beta.** The Journeys API is in beta. Endpoints and response fields can still change.
</Info>

## Overview

Retrieve performance stats for a single [Journey](/docs/en/journeys-overview) 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](/docs/en/journeys-analytics) in the dashboard.

<Note>
  The response is stats-only and carries no definition detail. Fetch the journey with [View journey](/reference/view-journey) and join the two by `id` to pair each count with the node or branch it describes.
</Note>

***

## How to use this API

Authenticate with your [App API Key](/docs/en/keys-and-ids). The authenticated key must have permission to view journeys. Find a journey's `id` from the [View journeys](/reference/view-journeys) API or in the dashboard URL when viewing the journey.

```http theme={null}
GET /apps/{app_id}/journeys/{id}/stats
```

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:

```json theme={null}
{
  "id": "0a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
  "started": 1000,
  "completed": 820,
  "exited_early": 60,
  "nodes": {
    "11111111-0000-0000-0000-000000000001": {
      "kind": "send_push",
      "waiting": 0,
      "completed": 980,
      "exited_early": 20,
      "message_stats": {
        "totals": {
          "sent": 1000,
          "delivered": 940,
          "clicked": 210,
          "failed": 45
        }
      }
    },
    "11111111-0000-0000-0000-000000000002": {
      "kind": "wait",
      "waiting": 120,
      "completed": 820,
      "exited_early": 40
    }
  },
  "branches": {}
}
```

### Journey-level counts

| Field          | Description                                            |
| -------------- | ------------------------------------------------------ |
| `id`           | UUID of the journey these stats belong to.             |
| `started`      | Users who entered the journey.                         |
| `completed`    | Users who reached the end of the journey normally.     |
| `exited_early` | Users who left the journey through an early exit rule. |

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.

| Field           | Description                                                                                                                                  |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `kind`          | The node's kind, repeated here so stats can be read without joining against the journey definition.                                          |
| `waiting`       | Users currently held at this node. This is users who entered the node minus those who advanced past it minus those who exited early from it. |
| `completed`     | Users who advanced past this node normally.                                                                                                  |
| `exited_early`  | Users who left the journey from this node through an early exit rule.                                                                        |
| `message_stats` | Channel delivery stats. Present only on message-sending nodes.                                                                               |

### 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](/docs/en/analytics-metrics-glossary).

<Tabs>
  <Tab title="Push">
    | Field                 | Dashboard term    | Description                                                                                     |
    | --------------------- | ----------------- | ----------------------------------------------------------------------------------------------- |
    | `sent`                | Sent              | Push messages sent.                                                                             |
    | `delivered`           | Delivered         | Messages accepted by the platform delivery service.                                             |
    | `confirmed_delivered` | Confirmed Receipt | Deliveries confirmed by the device. Requires [confirmed delivery](/docs/en/confirmed-delivery). |
    | `clicked`             | Clicked           | Message clicks.                                                                                 |
    | `failed`              | Failed            | Deliveries that errored.                                                                        |
    | `unsubscribed`        | Unsubscribed      | Subscriptions that became unsubscribed, i.e. invalid or revoked push tokens.                    |
    | `frequency_capped`    | Frequency Capped  | Sends suppressed by [frequency capping](/docs/en/frequency-capping).                            |

    The [View message](/reference/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.
  </Tab>

  <Tab title="Email">
    | Field          | Dashboard term   | Description                                                        |
    | -------------- | ---------------- | ------------------------------------------------------------------ |
    | `sent`         | Sent             | Emails sent.                                                       |
    | `delivered`    | Delivered        | Emails delivered.                                                  |
    | `opened`       | Unique Opens     | Recipients who opened the email, counted once each.                |
    | `clicked`      | Unique Clicks    | Recipients who clicked the email, counted once each.               |
    | `bounced`      | Bounced          | Hard bounces.                                                      |
    | `failed`       | Failed           | Sends that failed.                                                 |
    | `spam`         | Reported as Spam | Recipients who reported the email as spam.                         |
    | `suppressed`   | Suppressed       | Sends suppressed by the [suppression list](/docs/en/suppressions). |
    | `unsubscribed` | Unsubscribed     | Recipients who unsubscribed.                                       |
  </Tab>

  <Tab title="SMS">
    | Field                | Dashboard term       | Description                                                                       |
    | -------------------- | -------------------- | --------------------------------------------------------------------------------- |
    | `sent`               | Sent                 | SMS messages sent.                                                                |
    | `successful`         |                      | Messages OneSignal dispatched to the provider without error.                      |
    | `delivered`          | Delivered            | Messages the provider confirmed delivered.                                        |
    | `undelivered`        | Provider Undelivered | Messages the provider reported as undelivered.                                    |
    | `sms_failed`         | Provider Errored     | Failures the provider reported.                                                   |
    | `errored`            |                      | Sends that errored inside OneSignal before reaching the provider.                 |
    | `failed`             | Failed               | Combined failure count. Roll-up of the OneSignal-side and provider-side failures. |
    | `rejected`           | Rejected             | Messages rejected by the provider or carrier.                                     |
    | `suppressed`         | Suppressed           | Sends suppressed before dispatch.                                                 |
    | `type_sms_delivered` |                      | Deliveries that went out as SMS.                                                  |
    | `type_rcs_delivered` |                      | Deliveries that went out as [RCS](/docs/en/rcs-messaging).                        |
    | `rcs_read`           | Read                 | RCS messages read.                                                                |
    | `clicked`            | Total Clicks         | Clicks on tracked links in the message.                                           |
    | `unique_clicked`     | Unique Clicks        | Unique clicks on tracked links in the message.                                    |

    `clicked` and `unique_clicked` are present only when the message contains tracked links.
  </Tab>

  <Tab title="In-app message">
    `send_iam` nodes report overall totals for the message.

    | Field            | Dashboard term | Description                                                                              |
    | ---------------- | -------------- | ---------------------------------------------------------------------------------------- |
    | `impressions`    | Impressions    | Times the in-app message was displayed.                                                  |
    | `unique_clicked` | Unique Clicks  | Unique element clicks.                                                                   |
    | `ctr`            |                | Click-through rate as `unique_clicked / impressions`. `0` when there are no impressions. |

    Per-element and per-platform breakdowns are not exposed by this endpoint. Use the in-app message report in the dashboard for those.
  </Tab>

  <Tab title="Webhook">
    | Field       | Description                              |
    | ----------- | ---------------------------------------- |
    | `sent`      | Webhook requests sent.                   |
    | `succeeded` | Requests that returned a success status. |
    | `failed`    | Requests that failed.                    |
    | `four_xx`   | Requests that returned a `4xx` status.   |
    | `five_xx`   | Requests that returned a `5xx` status.   |
    | `timeouts`  | Requests that timed out.                 |
  </Tab>
</Tabs>

<Warning>
  Node-level message stats are tracked from 2023-08-20 onward. `message_stats` for a journey activated before that date can be incomplete.
</Warning>

### 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

| Status | Code                | Description                                                                                                                             |
| ------ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| 404    | `journey-not-found` | No journey with that `id` exists for this app.                                                                                          |
| 429    |                     | Rate limit exceeded. Wait the number of seconds in the `Retry-After` header before retrying. See [Rate limits](/reference/rate-limits). |

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


## OpenAPI

````yaml GET /apps/{app_id}/journeys/{id}/stats
openapi: 3.1.0
info:
  title: api.onesignal.com
  version: '11.6'
servers:
  - url: https://api.onesignal.com
security:
  - {}
paths:
  /apps/{app_id}/journeys/{id}/stats:
    get:
      summary: View journey stats
      description: >-
        Retrieve performance stats for a single journey: journey-level entry and
        exit counts, per-node counts keyed by node `id`, per-branch counts keyed
        by branch `id`, and channel delivery stats for message-sending nodes.
        The response carries no definition detail, so join it by `id` against
        the journey from [View journey](/reference/view-journey).
      operationId: view-journey-stats
      parameters:
        - name: app_id
          in: path
          description: >-
            Your OneSignal App ID in UUID v4 format. See [Keys &
            IDs](/docs/en/keys-and-ids).
          schema:
            type: string
            default: YOUR_APP_ID
          required: true
        - name: id
          in: path
          description: UUID of the journey to retrieve stats for.
          required: true
          schema:
            type: string
            default: YOUR_JOURNEY_ID
        - name: Authorization
          in: header
          description: >-
            Your App API key with prefix `Key `. See [Keys &
            IDs](/docs/en/keys-and-ids).
          required: true
          schema:
            type: string
            default: Key YOUR_APP_API_KEY
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JourneyStats'
              examples:
                Result:
                  value:
                    id: 0a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9
                    started: 1000
                    completed: 820
                    exited_early: 60
                    nodes:
                      11111111-0000-0000-0000-000000000001:
                        kind: send_push
                        waiting: 0
                        completed: 980
                        exited_early: 20
                        message_stats:
                          totals:
                            sent: 1000
                            delivered: 940
                            confirmed_delivered: 902
                            clicked: 210
                            failed: 45
                            unsubscribed: 12
                            frequency_capped: 3
                      11111111-0000-0000-0000-000000000002:
                        kind: wait
                        waiting: 120
                        completed: 820
                        exited_early: 40
                    branches: {}
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JourneyCodedErrorResponse'
              example:
                errors:
                  - code: journey-not-found
                    title: Journey not found
                    meta: {}
        '429':
          description: '429'
          headers:
            Retry-After:
              description: >-
                Number of seconds to wait before retrying the request. Always
                emitted on 429 responses.
              schema:
                type: integer
                minimum: 0
components:
  schemas:
    JourneyStats:
      type: object
      description: >-
        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](/reference/view-journey).
      properties:
        id:
          type: string
          description: UUID of the journey these stats belong to.
        started:
          type: integer
          description: Users who entered the journey.
        completed:
          type: integer
          description: Users who reached the end of the journey normally.
        exited_early:
          type: integer
          description: Users who left the journey through an early exit rule.
        nodes:
          type: object
          description: >-
            Node stats keyed by node `id`. Includes every node in the graph, at
            any nesting depth.
          additionalProperties:
            $ref: '#/components/schemas/JourneyNodeStats'
        branches:
          type: object
          description: >-
            Branch stats keyed by branch `id`. Empty for a journey with no
            branching nodes.
          additionalProperties:
            $ref: '#/components/schemas/JourneyBranchStats'
    JourneyCodedErrorResponse:
      type: object
      description: Error response with a stable machine-readable `code`.
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: >-
                  Stable, kebab-case error identifier. Does not change once
                  shipped.
              title:
                type: string
                description: Human-readable message. Wording may change between releases.
              meta:
                type: object
                description: Optional structured context. Shape varies by error.
    JourneyNodeStats:
      type: object
      description: >-
        Stats for a single node. Keyed in the response by the node's
        server-assigned `id`.
      properties:
        kind:
          type: string
          enum:
            - wait
            - time_window
            - send_push
            - send_email
            - send_sms
            - send_iam
            - send_webhook
            - tag
            - split_range
            - yes_no
            - wait_until
          description: >-
            Node kind, repeated here so stats can be read without joining
            against the journey definition.
        waiting:
          type: integer
          description: >-
            Users currently held at this node, i.e. those who entered but have
            neither advanced to the next node nor exited early.
        completed:
          type: integer
          description: Users who advanced past this node normally.
        exited_early:
          type: integer
          description: >-
            Users who left the journey from this node through an early exit
            rule.
        message_stats:
          $ref: '#/components/schemas/JourneyMessageStats'
    JourneyBranchStats:
      type: object
      description: >-
        Stats for a single branch of a branching node. Keyed in the response by
        the branch's server-assigned `id`.
      properties:
        completed:
          type: integer
          description: Users who took this branch.
    JourneyMessageStats:
      type: object
      description: >-
        Delivery stats for a message-sending node. Present only on `send_push`,
        `send_email`, `send_sms`, `send_iam`, and `send_webhook` nodes. The keys
        inside `totals` depend on the node's channel.
      properties:
        totals:
          type: object
          description: >-
            All-time totals for this node, keyed by channel-specific stat name.
            See [View journey stats](/reference/view-journey-stats) for the key
            set per channel.
          additionalProperties:
            type: number

````