---
title: "Update Scenario"
method: PUT
path: "/api/v1/scenarios/{scenario_id}"
tags: ["Scenarios"]
---

# Update Scenario

`PUT /api/v1/scenarios/{scenario_id}`

## Request

- The document declares no server URL.
- Auth: OAuth 2
  - Password
  - Token URL: `/api/v1/login/access-token`
- TypeScript: <https://skmtc.dev/plan4better/apis/goat/docs/api/v1/scenarios/:scenario_id/put.ts> (a function with typed inputs; its response is checked against the schema)

Update scenario.

## Path parameters

- `scenario_id` integer, required

## Request body

- ScenarioUpdate
  - `scenario_name` string, required

## Response `200`

Successful Response

- Scenario
  - `id` integer
  - `scenario_name` string, required
  - `routing_heatmap_computed` boolean
  - `creation_date` string, date-time
  - `user_id` integer
  - `data_upload_ids` integer[]
  - `study_area_id` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/plan4better/apis/goat.md) - [All operations](https://skmtc.dev/plan4better/apis/goat/llms.txt) - [OpenAPI document](https://skmtc.dev/plan4better/apis/goat/revisions/931df3e5ac48?raw)
