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

# Update a monitor

> Pause or resume a monitor, change interval, or attach or detach a webhook.



## OpenAPI

````yaml /api-reference/openapi.yaml patch /v1/monitors/{monitor_id}
openapi: 3.1.0
info:
  title: Gainflow API
  version: 1.1.0
  description: >
    Hard-to-get web data delivered to builders and AI agents. All public REST
    endpoints use snake_case JSON, RFC 9457 application/problem+json errors,
    opaque cursor pagination, and IETF RateLimit headers. Remote MCP server
    endpoint: https://mcp.gainflow.ai/mcp (OAuth 2.1 via WorkOS AuthKit or
    Bearer gf_live_*).
servers:
  - url: https://api.gainflow.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Scraping
    description: Fetch pages and PDFs, and discover URLs on a site.
  - name: Monitors
    description: Scheduled website change monitoring and diff history.
  - name: Webhooks
    description: Signed HMAC-SHA256 outbound webhook endpoints and delivery logs.
  - name: Batches
    description: Asynchronous bulk URL scraping jobs.
  - name: Crawls
    description: Asynchronous multi-page website crawls.
  - name: Account
    description: Credit balance, plan and the credit ledger.
  - name: API keys
    description: Create, list and revoke gf_live_* keys. Needs a signed-in OAuth session.
  - name: Billing
    description: Stripe Checkout and Customer Portal. Needs a signed-in OAuth session.
paths:
  /v1/monitors/{monitor_id}:
    patch:
      tags:
        - Monitors
      summary: Update a monitor
      description: >-
        Pause or resume a monitor, change interval, or attach or detach a
        webhook.
      operationId: updateMonitor
      parameters:
        - name: monitor_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMonitorRequest'
      responses:
        '200':
          description: Updated monitor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Monitor'
        '400':
          $ref: '#/components/responses/ProblemResponse'
        '401':
          $ref: '#/components/responses/ProblemResponse'
        '404':
          $ref: '#/components/responses/ProblemResponse'
components:
  schemas:
    UpdateMonitorRequest:
      type: object
      additionalProperties: false
      properties:
        status:
          type: string
          enum:
            - active
            - paused
        interval_sec:
          type: integer
          minimum: 300
          maximum: 604800
        webhook_id:
          type:
            - string
            - 'null'
          format: uuid
    Monitor:
      type: object
      required:
        - id
        - url
        - interval_sec
        - diff_mode
        - country
        - webhook_id
        - status
        - baseline_status
        - last_checked_at
        - next_run_at
        - created_at
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
          format: uri
        interval_sec:
          type: integer
        diff_mode:
          type: string
          enum:
            - text
            - json
        country:
          type: string
        webhook_id:
          type:
            - string
            - 'null'
          format: uuid
        status:
          type: string
          enum:
            - active
            - paused
        baseline_status:
          type: string
          enum:
            - pending
            - ready
            - failed
        last_checked_at:
          type:
            - string
            - 'null'
          format: date-time
        next_run_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
    ProblemDetails:
      type: object
      required:
        - type
        - title
        - status
        - code
        - request_id
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        code:
          type: string
          enum:
            - UNAUTHORIZED
            - FORBIDDEN
            - INSUFFICIENT_CREDITS
            - RATE_LIMITED
            - VALIDATION_ERROR
            - NOT_FOUND
            - CONFLICT
            - UPSTREAM_FAILED
            - INTERNAL_ERROR
        request_id:
          type: string
  responses:
    ProblemResponse:
      description: RFC 9457 Problem Details error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Either a Gainflow API key (gf_live_*) or a WorkOS AuthKit OAuth 2.1 JWT.

````

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