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

# Update monitor

> Update an existing monitor. Pause or resume a monitor by setting status to PAUSED or ACTIVE. See [Monitors](https://docs.galtea.ai/concepts/product/monitor).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json patch /monitors/{id}
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /monitors/{id}:
    patch:
      tags:
        - monitors
      summary: Update monitor
      description: >-
        Update an existing monitor. Pause or resume a monitor by setting status
        to PAUSED or ACTIVE. See
        [Monitors](https://docs.galtea.ai/concepts/product/monitor).
      operationId: updateMonitor
      parameters:
        - name: id
          in: path
          description: Monitor ID
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Monitor'
      responses:
        '200':
          description: Monitor updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Monitor'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Monitor not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Monitor:
      type: object
      required:
        - productId
        - name
        - metricGroupIds
      properties:
        id:
          type: string
          example: monitor_123
        productId:
          type: string
          example: prod_123
        versionId:
          type: string
          nullable: true
          description: >-
            Optional version to narrow the monitor to. When null the monitor
            watches the whole product.
          example: version_123
        userId:
          type: string
          nullable: true
          example: user_123
        name:
          type: string
          example: Production quality watch
        metricGroupIds:
          type: array
          items:
            type: string
          description: >-
            Metric families (Metric.metricGroupId) the monitor scores with. The
            monitor binds the family, not a specific revision, so revising a
            metric is picked up automatically without editing the monitor.
          example:
            - metricGroup_123
        samplingPercentage:
          type: number
          default: 10
          minimum: 0
          exclusiveMinimum: true
          maximum: 100
          description: >-
            Percentage of production sessions to evaluate (greater than 0, at
            most 100).
          example: 10
        monthlyCreditCap:
          type: integer
          nullable: true
          minimum: 1
          description: >-
            Optional monthly credit ceiling for this monitor. When set it must
            be a positive integer; it may exceed the organization monthly
            allocation (spend is clamped to the available balance). Null means
            uncapped.
          example: 500
        inactivityWindowMinutes:
          type: integer
          default: 5
          minimum: 1
          description: >-
            Minutes of inactivity after which a session is considered complete
            and eligible for evaluation.
          example: 5
        status:
          type: string
          enum:
            - ACTIVE
            - PAUSED
            - CAPPED
            - NO_CREDITS
            - FAILING
          default: ACTIVE
          description: >-
            Users may set ACTIVE or PAUSED; CAPPED, NO_CREDITS and FAILING are
            system-set by the scanner and rejected on user writes.
          example: ACTIVE
        createdAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````