---
title: "register or update a record/replay cassette"
method: PUT
path: "/mockserver/cassettes"
tags: ["control"]
---

# register or update a record/replay cassette

`PUT /mockserver/cassettes`

## Request

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

Registers (or updates) a cassette entry in the in-memory cassette registry from a JSON body. The 'path' field is required; 'filename', 'expectationCount' and 'origin' are optional.

## Request body

- object
  - `path` string, required: cassette path (required, used as the registry key)
  - `filename` string
  - `expectationCount` integer
  - `origin` string

## Response `201`

cassette registered

- object
  - `path` string
  - `filename` string
  - `expectationCount` integer
  - `origin` string
  - `lastUsed` integer

## Other responses

- `400`: missing request body or missing 'path' 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)
