---
title: "externally trigger a scenario state transition"
method: PUT
path: "/mockserver/scenario/{name}/trigger"
tags: ["scenario"]
---

# externally trigger a scenario state transition

`PUT /mockserver/scenario/{name}/trigger`

## Request

- Base URL: `http://localhost:1080`
- URL: `http://localhost:1080/mockserver/scenario/{name}/trigger`
- Auth: none declared

Advances the named scenario to newState immediately. Intended for driving a scenario forward from a test harness or CI pipeline.

## Path parameters

- `name` string, required

## Request body

- object
  - `newState` string, required: the state to transition the scenario to

## Response `200`

scenario state transition triggered

- object
  - `scenarioName` string
  - `currentState` string

## Other responses

- `400`: invalid request (e.g. missing scenario name or newState field)

---

[API](https://skmtc.dev/mock-server/apis/mockserver-api.md) · [All operations](https://skmtc.dev/mock-server/apis/mockserver-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mock-server/apis/mockserver-api/revisions/9239b693996e?raw)
