---
title: "Atomically replace all scenarios on a mock"
method: PUT
path: "/v1/mocks/{mock_id}/scenarios"
tags: ["mocks"]
---

# Atomically replace all scenarios on a mock

`PUT /v1/mocks/{mock_id}/scenarios`

## Path parameters

- `mock_id` string, uuid, required

## Request body

- BulkScenarioReplaceRequest — Atomic replacement: drops all existing scenarios, inserts the new set.
  - `scenarios` MockScenarioCreate[], required
    - `name` string, required
    - `priority` integer
    - `match_method` string
    - `match_path_pattern` string, nullable
    - `match_headers` object
    - `match_query` object
    - `match_body` object
    - `response_status` integer
    - `response_headers` object
    - `response_body` union
      - object
      - unknown[]
        - unknown
    - `delay_ms` integer
    - `is_enabled` boolean

## Response `200`

Successful Response

- MockScenarioResponse[]
  - `id` string, uuid, required
  - `mock_id` string, uuid, required
  - `name` string, required
  - `priority` integer, required
  - `match_method` string, required
  - `match_path_pattern` string, nullable, required
  - `match_headers` object, required
  - `match_query` object, required
  - `match_body` object, required
  - `response_status` integer, required
  - `response_headers` object, required
  - `response_body` union, required
    - object
    - unknown[]
      - unknown
  - `delay_ms` integer, required
  - `is_enabled` boolean, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400` — Bad request
- `401` — Authentication required
- `404` — Resource not found
- `422` — Validation Error

---

[API](https://skmtc.net/oneloop-hq/apis/feather-api.md) · [All operations](https://skmtc.net/oneloop-hq/apis/feather-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneloop-hq/feather-api/revisions/888bdd5c076e/schema)
