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

# Scenarios

> Retrieve the resolved domains, activities, and variables for every scenario in a conversation, or for a single scenario.

These endpoints return the resolved state of a conversation's [scenarios](/concepts/scenarios) — the domains, activities, and variables in effect — rather than the message-by-message history returned by [`GET /v1/conversations/:id`](/api/conversations).

## All scenarios

```http theme={null}
GET /v1/conversations/:id/context
```

Returns every scenario in the conversation, each with its domains, activities, and variables.

```json theme={null}
{
  "conversation_id": "550e8400-...",
  "scenarios": [
    {
      "id": 1,
      "domains": [{ ... }],
      "activities": [{ ... }],
      "variables": [
        {
          "id": "...",
          "key": "monthly_payment",
          "title": "Monthly payment",
          "source": "calculated",
          "historical": false,
          "value": "2398.20 USD",
          "display": { ... }
        }
      ]
    }
  ]
}
```

The `domains`, `activities` and `variables` objects use the same shape as the `results` object in [`POST /v1/calculate`](/api/calculate). A conversation with no completed calculations returns an empty `scenarios` array.

## A single scenario

```http theme={null}
GET /v1/conversations/:id/context/:scenario_id
```

Returns one scenario by its index.

```json theme={null}
{
  "conversation_id": "550e8400-...",
  "scenario": {
    "id": 1,
    "domains": [ "..." ],
    "activities": [ "..." ],
    "variables": [ "..." ]
  }
}
```
