> ## Documentation Index
> Fetch the complete documentation index at: https://doc.featherhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Atomically replace all scenarios on a mock



## OpenAPI

````yaml /api-reference/openapi.json put /v1/mocks/{mock_id}/scenarios
openapi: 3.1.0
info:
  title: Feather API
  description: >-
    Unified customer experience platform API. Manages identity, conversations,
    memory, agents, procedures, policies, model routing, knowledge bases,
    integrations, and runtime execution.
  version: 1.21.0
servers:
  - url: https://api-sandbox.featherhq.com
    description: Sandbox
  - url: http://localhost:8000
    description: Local dev
security: []
paths:
  /v1/mocks/{mock_id}/scenarios:
    put:
      tags:
        - mocks
      summary: Atomically replace all scenarios on a mock
      operationId: bulkReplaceMockScenarios
      parameters:
        - name: mock_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Mock Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkScenarioReplaceRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MockScenarioResponse'
                title: Response Bulkreplacemockscenarios
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    BulkScenarioReplaceRequest:
      properties:
        scenarios:
          items:
            $ref: '#/components/schemas/MockScenarioCreate'
          type: array
          title: Scenarios
      type: object
      required:
        - scenarios
      title: BulkScenarioReplaceRequest
      description: 'Atomic replacement: drops all existing scenarios, inserts the new set.'
    MockScenarioResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        mock_id:
          type: string
          format: uuid
          title: Mock Id
        name:
          type: string
          title: Name
        priority:
          type: integer
          title: Priority
        match_method:
          type: string
          title: Match Method
        match_path_pattern:
          anyOf:
            - type: string
            - type: 'null'
          title: Match Path Pattern
        match_headers:
          additionalProperties: true
          type: object
          title: Match Headers
        match_query:
          additionalProperties: true
          type: object
          title: Match Query
        match_body:
          additionalProperties: true
          type: object
          title: Match Body
        response_status:
          type: integer
          title: Response Status
        response_headers:
          additionalProperties: true
          type: object
          title: Response Headers
        response_body:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
          title: Response Body
        delay_ms:
          type: integer
          title: Delay Ms
        is_enabled:
          type: boolean
          title: Is Enabled
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - mock_id
        - name
        - priority
        - match_method
        - match_path_pattern
        - match_headers
        - match_query
        - match_body
        - response_status
        - response_headers
        - response_body
        - delay_ms
        - is_enabled
        - created_at
        - updated_at
      title: MockScenarioResponse
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response returned by all API error handlers.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MockScenarioCreate:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        priority:
          type: integer
          maximum: 10000
          minimum: 0
          title: Priority
          default: 100
        match_method:
          type: string
          title: Match Method
          default: ANY
        match_path_pattern:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Match Path Pattern
        match_headers:
          additionalProperties: true
          type: object
          title: Match Headers
        match_query:
          additionalProperties: true
          type: object
          title: Match Query
        match_body:
          additionalProperties: true
          type: object
          title: Match Body
        response_status:
          type: integer
          maximum: 599
          minimum: 100
          title: Response Status
          default: 200
        response_headers:
          additionalProperties: true
          type: object
          title: Response Headers
        response_body:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
          title: Response Body
        delay_ms:
          type: integer
          maximum: 60000
          minimum: 0
          title: Delay Ms
          default: 0
        is_enabled:
          type: boolean
          title: Is Enabled
          default: true
      type: object
      required:
        - name
      title: MockScenarioCreate
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````