---
title: "Update state settings"
method: PUT
path: "/v1/mock-apis/{mockApiId}/settings/state"
tags: ["Settings"]
---

# Update state settings

`PUT /v1/mock-apis/{mockApiId}/settings/state`

## Request body

- object
  - `state` StateSettings, required — State management settings for the mock API.
    - `defaultContextExpression` string — Default expression used to determine the state context for requests.

## Response `200`

Settings successfully updated

- object
  - `state` StateSettings — State management settings for the mock API.
    - `defaultContextExpression` string — Default expression used to determine the state context for requests.

## Other responses

- `401` — 401 Unauthenticated response
- `403` — 403 Unauthorized response

---

[API](https://skmtc.net/wiremock/apis/wiremock-cloud.md) · [All operations](https://skmtc.net/wiremock/apis/wiremock-cloud/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wiremock/wiremock-cloud/revisions/93bebefc672f/schema)
