---
title: "WRITE — Save a scenario in K-Φ, so it appears in the app's Simulation page with its levers (and can be run again with kphi_run_scenario)"
method: POST
path: "/api/v1/save_scenario"
---

# WRITE — Save a scenario in K-Φ, so it appears in the app's Simulation page with its levers (and can be run again with kphi_run_scenario)

`POST /api/v1/save_scenario`

## Request

- Base URL: `https://k-phi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://k-phi.com/api/v1/save_scenario`
- Auth: HTTP bearer

WRITE — Save a scenario in K-Φ, so it appears in the app's Simulation page with its levers (and can be run again with kphi_run_scenario). Give a name and the levers ([{ type, params }], see kphi_scenario_levers); pass scenario_id to replace the levers of a scenario saved before. Call only after kphi_run_scenario on the same levers, and pass the same scope (version, period, entity, BU): a custom lever's account class is resolved on it. The result lists the stored levers with their classes — report them. Requires the mcp:write scope.

## Request body

- object
  - `version` string: GL version label (e.g. "2026-06"), from kphi_list_versions. Required when more than one version exists: without it the tool answers needs_version with the list instead of picking one.
  - `period` string: Filter to a single period (YYYY-MM). Omit to include all periods in the version.
  - `entity` string: Filter to a single entity code. Omit for consolidated view across all entities.
  - `bu` string: Filter to a single business unit. Omit for all BUs.
  - `name` string, required: e.g. "Salaries +10% from January"
  - `levers` object[], required
    - `type` string, required
    - `params` object
  - `scenario_id` string: Replace this saved scenario instead of creating one.

## Response `200`

OK

- object
  - `data` object
  - `meta` object
    - `api` string
    - `capability` string
    - `at` string

## Other responses

- `401`: No or invalid credential
- `403`: Scope, extension or Builder Mode refused
- `422`: The capability refused the input
- `429`: Rate or daily quota reached

---

[API](https://skmtc.dev/k-phi/apis/k-api.md) · [All operations](https://skmtc.dev/k-phi/apis/k-api/llms.txt) · [OpenAPI document](https://skmtc.dev/k-phi/apis/k-api/revisions/60b28690ec35?raw)
