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

# Journey and campaign tools

> Inspect journeys, campaigns, and their performance with Sagepilot MCP.

Sagepilot MCP includes read-only tools for journeys and campaigns. Use them to list journeys and campaigns, inspect one by ID, and pull delivery stats, cost stats, and attribution.

These tools require the `journeys:read` and `campaigns:read` scopes on your API client. Grant them under **Settings -> API Clients** when you create or edit the client.

All date parameters accept ISO 8601 timestamps. Timestamps without a timezone are treated as UTC. Where a tool takes `start_date` and `end_date`, pass both or neither.

## list\_journeys

Lists journey summaries with trigger metadata, per-journey message stats, and status counts.

| Parameter                | Description                                                         |
| ------------------------ | ------------------------------------------------------------------- |
| `status`                 | `all`, `live`, `draft`, `paused`, or `archived`. Defaults to `all`. |
| `journey_classification` | `all`, `marketing`, or `utility`. Defaults to `all`.                |
| `source`                 | Journey source filter. Defaults to `all`.                           |
| `search`                 | Text search over journey names.                                     |
| `start_date`, `end_date` | Restrict listing stats to a date range.                             |
| `page`, `page_size`      | Pagination. `page_size` is 1 to 100 and defaults to 10.             |

## get\_journey

Gets one journey by ID. The response always includes a summarized flow graph with node and edge counts by type.

| Parameter      | Description                                                                                                                         |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `journey_id`   | Journey ID. Required.                                                                                                               |
| `include_flow` | Set to `true` to also return the raw flow definition. The raw flow can be large, so leave it off unless you need node-level detail. |

## get\_journey\_analytics

Gets analytics for one journey: detailed delivery stats (sent, delivered, read, clicked, failed, entered, exited, and rates), cost stats, and attribution.

| Parameter                  | Description                                                   |
| -------------------------- | ------------------------------------------------------------- |
| `journey_id`               | Journey ID. Required.                                         |
| `start_date`, `end_date`   | Restrict stats to a date range. Omit both for all-time stats. |
| `attribution_type`         | `delivery`, `read`, or `clicked`. Defaults to `delivery`.     |
| `attribution_window_hours` | Attribution window in hours. Defaults to `72`.                |

## list\_campaigns

Lists campaign summaries with per-campaign message stats.

| Parameter                | Description                                                                                                                                    |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `status`                 | `all`, `DRAFT`, `CREATED`, `SCHEDULED`, `PREPARING`, `PREPARED`, `FIRING`, `COMPLETED`, `FAILED`, `CANCELLED`, or `PAUSED`. Defaults to `all`. |
| `campaign_type`          | `all`, `journey`, or `single_message`. Defaults to `all`.                                                                                      |
| `search`                 | Text search over campaign names.                                                                                                               |
| `start_date`, `end_date` | Restrict listing to a date range.                                                                                                              |
| `page`, `page_size`      | Pagination. `page_size` is 1 to 100 and defaults to 10.                                                                                        |

## get\_campaign

Gets one campaign by ID with detailed delivery stats, cost stats, attribution, retry success count, and voice stats where applicable.

| Parameter                  | Description                                               |
| -------------------------- | --------------------------------------------------------- |
| `campaign_id`              | Campaign ID. Required.                                    |
| `attribution_type`         | `delivery`, `read`, or `clicked`. Defaults to `delivery`. |
| `attribution_window_hours` | Attribution window in hours. Defaults to `72`.            |
