---
title: "set the proxy / mock operating mode"
method: PUT
path: "/mockserver/mode"
tags: ["control"]
---

# set the proxy / mock operating mode

`PUT /mockserver/mode`

## Request

- Base URL: `http://localhost:1080`
- URL: `http://localhost:1080/mockserver/mode`
- Auth: none declared

Sets the operating mode that controls how unmatched requests are handled. SIMULATE matches expectations and returns a 404 for unmatched requests; SPY matches expectations but forwards (and records) unmatched requests to the real downstream; CAPTURE forwards and records all traffic (the same proxy-on-no-match behaviour as SPY).

## Query parameters

- `mode` 'SIMULATE' | 'SPY' | 'CAPTURE', required

## Response `200`

mode set successfully

- object
  - `mode` 'SIMULATE' | 'SPY' | 'CAPTURE'
  - `proxyUnmatchedRequests` boolean

## Other responses

- `400`: missing or unknown mode

---

[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)
