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

# Update a monitor



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/monitors/{id}
openapi: 3.1.0
info:
  title: Veri API
  description: >-
    REST API for the Veri RL post-training platform. All requests require a
    Bearer API key (`vk_` prefix).
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.veri.studio
    description: Production
security: []
tags:
  - name: Training jobs
    description: Create, monitor, and manage training jobs.
  - name: Datasets
    description: Upload and connect training datasets.
  - name: Deployments
    description: Serve trained models and run inference.
  - name: Volumes
    description: Persistent file storage mounted into jobs.
  - name: Models
    description: Custom model registry deployments serve from.
  - name: Regions
    description: Discover available launch regions.
  - name: GPU
    description: Live GPU availability by provider and region.
  - name: Code artifacts
    description: Upload custom training script bundles.
  - name: Billing
    description: Credit balance and transaction history.
  - name: API keys
    description: Create and revoke API keys.
  - name: Account
    description: The authenticated caller's identity.
  - name: Settings
    description: Account-level integrations (Weights & Biases).
  - name: Metrics
    description: Prometheus metrics export for your own observability stack.
  - name: Evaluators
    description: 'Evaluators: versioned scoring rules (LLM judge, code, human).'
  - name: Experiments
    description: >-
      Experiments: offline runs of a pinned dataset snapshot through a target,
      scored by pinned evaluators.
  - name: Annotation queues
    description: >-
      Human review: queue traces, threads and experiment items, reserve one at a
      time, score them and feed corrections back into datasets.
  - name: Monitors
    description: >-
      Monitors: evaluators scoring a sampled share of a deployment's live
      traffic.
  - name: Observability
    description: Agent conversations, agents and their traffic.
  - name: Public runs
    description: Unauthenticated reads of runs their owners published to Explore.
paths:
  /v1/monitors/{id}:
    patch:
      tags:
        - Monitors
      summary: Update a monitor
      operationId: update
      parameters:
        - name: id
          in: path
          description: Monitor id (mon_...)
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorUpdateRequest'
        required: true
      responses:
        '200':
          description: The updated monitor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorResponse'
        '400':
          description: >-
            Invalid field, an evaluator version a monitor can't run, or evals or
            observability disabled
        '404':
          description: No such monitor or evaluator version in the caller's workspace
        '409':
          description: trace_bodies_required on enabling; or the evaluator is archived
      security:
        - bearerAuth: []
components:
  schemas:
    MonitorUpdateRequest:
      type: object
      description: |-
        Omitted fields keep their value. The deployment and the evaluator are
        fixed at create.
      properties:
        name:
          type:
            - string
            - 'null'
        evaluator_version:
          type:
            - integer
            - 'null'
          format: int32
          description: A version to pin, or null to track the latest.
        sampling_rate:
          type:
            - number
            - 'null'
          format: double
        filter:
          type:
            - object
            - 'null'
          description: '{agent?}; null clears it.'
        idle_minutes:
          type:
            - integer
            - 'null'
          format: int32
        daily_cap:
          type:
            - integer
            - 'null'
          format: int32
        enabled:
          type:
            - boolean
            - 'null'
        review_below_confidence:
          type:
            - number
            - 'null'
          format: double
          description: Confidence routing; null turns it off (send both, or both null).
        review_queue_id:
          type:
            - string
            - 'null'
    MonitorResponse:
      type: object
      description: One monitor.
      required:
        - object
        - id
        - name
        - deployment_id
        - evaluator_id
        - evaluator_name
        - scope
        - sampling_rate
        - filter
        - idle_minutes
        - daily_cap
        - enabled
        - stats
        - created_at
        - updated_at
      properties:
        object:
          type: string
          description: Always "monitor".
        id:
          type: string
          description: '`mon_...`'
        name:
          type: string
        deployment_id:
          type: string
          description: The deployment whose traffic is scored.
        evaluator_id:
          type: string
        evaluator_name:
          type: string
        evaluator_version:
          type:
            - integer
            - 'null'
          format: int32
          description: The pinned version; null tracks the latest.
        scope:
          type: string
          description: |-
            single_turn (scores traced requests) | thread (scores idle threads),
            from the version the monitor runs.
        sampling_rate:
          type: number
          format: double
          description: Share of the traffic scored, 0..1.
        filter:
          type: object
          description: '{agent?}: only requests or threads sent with this X-Veri-Agent.'
        idle_minutes:
          type: integer
          format: int32
          description: >-
            Thread monitors: minutes without a request before a thread is
            scored.
        daily_cap:
          type: integer
          format: int32
          description: Most targets queued per UTC day.
        enabled:
          type: boolean
        review_below_confidence:
          type:
            - number
            - 'null'
          format: double
          description: |-
            Confidence routing: an ok score whose confidence is below this
            (0..1) adds its target to `review_queue_id`; null = off.
        review_queue_id:
          type:
            - string
            - 'null'
          description: The annotation queue low-confidence targets go to.
        stats:
          $ref: '#/components/schemas/MonitorStatsResponse'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    MonitorStatsResponse:
      type: object
      required:
        - scored_today
        - flagged_today
        - scored_7d
        - flagged_7d
      properties:
        scored_today:
          type: integer
          format: int64
          description: ok scores written today (UTC).
        flagged_today:
          type: integer
          format: int64
          description: Of those, the ones with passed = false.
        scored_7d:
          type: integer
          format: int64
        flagged_7d:
          type: integer
          format: int64
        last_scored_at:
          type:
            - string
            - 'null'
          format: date-time
        human_agreement:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/HumanAgreement'
              description: Null until a human label shares a target with this monitor.
    HumanAgreement:
      type: object
      description: |-
        Agreement between a monitor's verdicts and human labels of the same
        evaluator on the same targets.
      required:
        - 'n'
        - rate
      properties:
        'n':
          type: integer
          format: int64
          description: Targets with both a monitor verdict and a human verdict.
        rate:
          type: number
          format: double
          description: Share of them where the verdicts agree, 0..1.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: API key with the `vk_` prefix. Create one from the dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.