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

# Update a monitor



## OpenAPI

````yaml https://www.sentivel.com/api/v1/openapi.json patch /monitors/{id}
openapi: 3.1.0
info:
  title: Sentivel API
  version: 1.0.0
  description: >-
    Provision and read your Sentivel workspace programmatically: components,
    monitors, status pages and incidents. Authenticate with an org API token
    (create one under Developers → API tokens in the dashboard).
  contact:
    name: Sentivel
    url: https://www.sentivel.com
servers:
  - url: https://www.sentivel.com/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Identity
    description: Who the token is
  - name: Components
    description: Status-page components (status units)
  - name: Monitors
    description: Uptime/HTTP checks
  - name: Status pages
    description: Public status pages
  - name: Incidents
    description: Incidents (read + manual create)
  - name: People
    description: Workspace members
  - name: Integrations
    description: Outbound alert destinations
  - name: On-call
    description: On-call schedules
paths:
  /monitors/{id}:
    patch:
      tags:
        - Monitors
      summary: Update a monitor
      operationId: updateMonitor
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorUpdate'
      responses:
        '200':
          description: The updated monitor.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Monitor'
        '400':
          description: Validation failed, or an unsafe target.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such monitor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    MonitorUpdate:
      type: object
      description: All fields optional; only provided fields change.
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 120
        target:
          type: string
          format: uri
        method:
          type: string
          enum:
            - GET
            - HEAD
            - POST
        intervalSeconds:
          type: integer
          minimum: 60
          maximum: 86400
        timeoutMs:
          type: integer
          minimum: 1000
          maximum: 60000
        openThreshold:
          type: integer
          minimum: 1
          maximum: 10
        resolveThreshold:
          type: integer
          minimum: 1
          maximum: 10
        expectedStatusCodes:
          type: array
          items:
            type: integer
            minimum: 100
            maximum: 599
        keyword:
          type: string
          maxLength: 200
        keywordAbsent:
          type: string
          maxLength: 200
        jsonAssertion:
          type: object
          required:
            - path
            - op
          properties:
            path:
              type: string
              maxLength: 200
            op:
              type: string
              enum:
                - eq
                - ne
                - contains
                - gt
                - lt
                - exists
            value:
              type: string
              maxLength: 500
        degradedAfterMs:
          type: integer
          minimum: 1
          maximum: 60000
        latencyThresholdMs:
          type: integer
          minimum: 1
          maximum: 60000
        headers:
          type: object
          additionalProperties:
            type: string
          description: Replace the monitor's custom request headers (stored encrypted).
        body:
          type: string
          maxLength: 32768
          description: Replace the monitor's request body (stored encrypted).
        contentType:
          type: string
          maxLength: 200
        environment:
          type:
            - string
            - 'null'
          maxLength: 60
        enabled:
          type: boolean
          description: Pause/resume the monitor.
    Monitor:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
            - string
            - 'null'
        componentId:
          type:
            - string
            - 'null'
          format: uuid
        type:
          type: string
          enum:
            - http
            - heartbeat
            - tcp
            - dns
        target:
          type: string
        method:
          type: string
        intervalSeconds:
          type: integer
        timeoutMs:
          type: integer
        openThreshold:
          type: integer
        resolveThreshold:
          type: integer
        environment:
          type:
            - string
            - 'null'
        enabled:
          type: boolean
        lastCheckedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        pingUrl:
          type: string
          format: uri
          description: >-
            Heartbeat only, returned on create. The URL the scheduled job pings.
            It's a secret credential, so it is not returned by the list/get
            endpoints.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - forbidden
                - not_found
                - invalid_request
                - rate_limited
                - conflict
                - internal
            message:
              type: string
            details:
              type: object
          required:
            - code
            - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'An org API token (`sv_…`), sent as `Authorization: Bearer <token>`.'

````