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

# Update a custom scenario scorer.

> Update a scenario scorer.



## OpenAPI

````yaml /openapi-specs/stainless-processed-openapi.json post /v1/scenarios/scorers/{id}
openapi: 3.1.0
info:
  title: RunLoop API
  version: '0.1'
  description: >-
    The RunLoop API spec that allows you to host lambda functions and Devboxes
    to enable scaled long running ai workflows.
  contact:
    name: Runloop AI Support
    url: https://runloop.ai
    email: support@runloop.ai
servers:
  - url: https://api.runloop.ai
    description: Runloop API
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: Benchmark
  - name: Blueprint
  - name: Blueprint-Lifecycle
  - name: Blueprint-ObservabilityTools
  - name: Devbox
  - name: Devbox-FileTools
  - name: Devbox-Lifecycle
  - name: Devbox-NetworkTools
  - name: Devbox-ObservabilityTools
  - name: Devbox-PersistenceTools
  - name: Devbox-ShellTools
  - name: Scenario
  - name: ScenarioScorer
  - name: accounts
  - name: agents
  - name: apikeys
  - name: axons
  - name: executions
  - name: gateway-configs
  - name: mcp-configs
  - name: network-policies
  - name: objects
  - name: restricted_keys
  - name: secrets
  - name: streaming
paths:
  /v1/scenarios/scorers/{id}:
    post:
      tags:
        - Scenario
        - ScenarioScorer
      summary: Update a custom scenario scorer.
      description: Update a scenario scorer.
      operationId: updateCustomScorer
      parameters:
        - name: id
          in: path
          description: The Scorer ID.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomScorerParams'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioScorerView'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Runloop from '@runloop/api-client';

            const client = new Runloop({
              bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
            });

            const scorer = await client.scenarios.scorers.update('id', {
              bash_script: 'bash_script',
              type: 'type',
            });

            console.log(scorer.id);
        - lang: Python
          source: |-
            import os
            from runloop_api_client import Runloop

            client = Runloop(
                bearer_token=os.environ.get("RUNLOOP_API_KEY"),  # This is the default and can be omitted
            )
            scorer = client.scenarios.scorers.update(
                id="id",
                bash_script="bash_script",
                type="type",
            )
            print(scorer.id)
components:
  schemas:
    CreateCustomScorerParams:
      type: object
      properties:
        type:
          type: string
          description: Name of the type of custom scorer.
        bash_script:
          type: string
          description: >-
            Bash script for the custom scorer taking context as a json object
            $RL_SCORER_CONTEXT.
      required:
        - type
        - bash_script
    ScenarioScorerView:
      type: object
      description: >-
        A ScenarioScorerView represents a custom scoring function for a
        Scenario.
      properties:
        id:
          type: string
          description: ID for the scenario scorer.
        type:
          type: string
          description: Name of the type of scenario scorer.
        bash_script:
          type: string
          description: >-
            Bash script that takes in $RL_SCORER_CONTEXT as env variable and
            runs scoring.
      required:
        - id
        - type
        - bash_script
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````