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

> ## Agent Instructions
> Install the Courier skill before writing code: `npx skills add trycourier/courier-skills`. It carries the verified SDK shapes and the rules you cannot get wrong.
> Authenticate every request with `Authorization: Bearer <API_KEY>`. A workspace has several environments and each has its own keys, which are plain `pk_` strings with no environment prefix. Start with Test.
> Send with `client.send.message`, the default import of the v7 Node SDK. Reference a template by its `nt_` id or its alias.
> A send accepts a bare Elemental element list, but storing content on a template requires the top-level elements wrapped in a channel element.
> Templates and journeys can be built in the Courier app or created through the API. Either way they live in the workspace and are referenced by ID when you send.
> The hosted MCP server is https://mcp.courier.com. For a briefing on what Courier is and when to use it, read https://www.courier.com/llms.txt.
> Prefer the Guides tab for how-do-I questions and the Docs tab for how-does-it-behave questions. The API reference lives under /api-reference.

# Journey runs and metrics

> Inspect a run by runId to see each node's outcome, and read where runs stall or exit.

A journey gives you two views of its behavior.

**Run inspection** answers "what happened for this one user?" node by node. **Metrics** answer "how is this journey performing overall?" across every run. Version history ties them together: a run always shows the version it executed. All three live in the journey editor.

## How it works

### Run inspection

Every invoke records a **run**: the journey's full execution trace for that user, identified by a `runId`. A journey's **Logs** tab lists its runs. Filter by run ID, status, date, or recipient, then open one to inspect it. Run inspection is a console view. No public API returns a run's step-by-step trace.

The detail view overlays each node's outcome on the journey graph. It shows which nodes ran, which branch was taken, where a run is paused, and which node failed. Click a node for its **step context**:

* the input data at that step
* the profile as it existed then
* the conditions evaluated, and whether they passed
* the node's output

Use it to answer "why did this branch take the wrong path" or "why did this send fail."

A run has one of these statuses:

| Status     | Meaning                        |
| ---------- | ------------------------------ |
| Processing | Actively executing.            |
| Waiting    | Paused on a delay or throttle. |
| Processed  | All nodes completed.           |
| Error      | A node failed.                 |
| Canceled   | Stopped before completing.     |

### Metrics

The **Metrics** tab shows delivery performance across the journey's send nodes:

* a send-volume chart over time
* a table of every template (one per send node) with sent, delivered, opened, and clicked rates

Click a template row for a drawer with per-metric charts and a provider-level breakdown. Filter to a 7-, 30-, or 90-day window, computed in UTC. Templates removed in a later version keep an "Inactive" prefix, so their historical metrics stay visible.

### Version history

Publishing a journey creates a version. Republish an older version to roll back. Inspection is version-aware: opening a run shows the version active when the run started, not the current draft. You see what that user experienced. Line up version history against the metrics timeline to correlate a metric shift with a publish.

## Limits & behavior

* **Run inspection is console-only.** No public endpoint returns a run's step-by-step trace. Inspect runs in the journey's Logs tab.
* **Metrics windows are UTC.** A "last 7 days" figure is 7 UTC days.
* **Runs are pinned to their version.** A run inspects against the version it executed, even after you publish changes.

## FAQ

<AccordionGroup>
  <Accordion title="How do I find a specific run?">
    Open the journey's Logs tab and search by run ID (returned from the invoke call), or filter by recipient, status, or date.
  </Accordion>

  <Accordion title="Why does an old run show a different journey than my current draft?">
    Inspection is version-aware. A run shows the published version active when it started, so you see what the user experienced, not your latest edits.
  </Accordion>

  <Accordion title="Can I pull run status over the API?">
    Not through a public endpoint. Run inspection is a console view. Use the `runId` from the invoke response to find the run in the Logs tab.
  </Accordion>
</AccordionGroup>
