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

# Update testing lab scenario by ID



## OpenAPI

````yaml patch /api/v1/testing-lab/scenarios/{id}
openapi: 3.0.0
info:
  version: 1.0.0
  title: Feather AI API
servers:
  - url: https://prod.featherhq.com
    description: Production environment
security: []
paths:
  /api/v1/testing-lab/scenarios/{id}:
    patch:
      tags:
        - Testing Lab
      summary: Update testing lab scenario by ID
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestingLabUpdateScenarioRequest'
      responses:
        '200':
          description: Scenario updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestingLabUpdatedScenario'
        '400':
          description: Bad request - validation error or missing scenario ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 400
                  message:
                    type: string
                    default: Bad request
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    default: BAD_REQUEST
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
        '404':
          description: Scenario not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 404
                  message:
                    type: string
                    default: Not found
                  code:
                    type: string
                    enum:
                      - NOT_FOUND
                    default: NOT_FOUND
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 500
                  message:
                    type: string
                    default: Internal server error
                  code:
                    type: string
                    enum:
                      - INTERNAL_SERVER_ERROR
                    default: INTERNAL_SERVER_ERROR
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
      security:
        - ApiKey: []
components:
  schemas:
    TestingLabUpdateScenarioRequest:
      type: object
      properties:
        agent:
          type: number
        assistant_id:
          type: string
        name:
          type: string
        personality:
          type: number
        instructions:
          type: string
        expected_outcome_prompt:
          type: string
        metrics:
          type: array
          items:
            type: number
        tags:
          type: array
          items:
            type: string
        tool_ids:
          type: array
          items:
            type: string
    TestingLabUpdatedScenario:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
        agent:
          type: number
        personality:
          type: number
        personality_name:
          type: string
        tags:
          type: array
          items:
            type: string
        tool_ids:
          nullable: true
        runs:
          type: array
          items:
            type: number
        metrics:
          type: array
          items:
            type: number
        metric_names:
          type: array
          items:
            type: string
        phone_number:
          type: string
        first_message:
          type: string
        inbound_phone_number:
          type: number
        inbound_phone_number_data:
          type: object
          properties:
            id:
              type: number
            number:
              type: string
            phone_number_id:
              type: string
            common:
              type: string
          required:
            - id
            - number
            - phone_number_id
            - common
        instructions:
          type: string
        simulation_description:
          type: string
        information_fields:
          type: object
          additionalProperties:
            nullable: true
        expected_outcome_prompt:
          type: string
        scenario_language:
          type: string
        test_profile:
          type: number
        test_profile_data:
          type: object
          properties:
            id:
              type: number
            agent:
              type: number
            name:
              type: string
            information:
              type: object
              additionalProperties:
                nullable: true
          required:
            - id
            - agent
            - name
            - information
      required:
        - id
        - name
        - agent
        - personality
        - personality_name
        - tags
        - runs
        - metrics
        - metric_names
        - phone_number
        - first_message
        - inbound_phone_number
        - inbound_phone_number_data
        - instructions
        - simulation_description
        - information_fields
        - expected_outcome_prompt
        - scenario_language
        - test_profile
        - test_profile_data
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key

````