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

# Update Monitor

> Change a monitor: name, companies, schedule, settings, or pause and resume it.



## OpenAPI

````yaml /api-reference/agent/openapi.json patch /monitors/{monitor_id}
openapi: 3.1.0
info:
  title: NewsCatcher Agent API
  description: >-
    Agent runs (events from a query, or news about companies), company lists and
    monitors. Authenticate with your API key in the x-api-key header.
  version: 1.0.0
servers:
  - url: https://api.newscatcherapi.com/agent
    description: Production server
security: []
paths:
  /monitors/{monitor_id}:
    patch:
      tags:
        - monitors
      summary: Update Monitor
      description: >-
        Change a monitor: name, companies, schedule, settings, or pause and
        resume it.
      operationId: update_monitor_monitors__monitor_id__patch
      parameters:
        - name: monitor_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Monitor Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMonitorRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorOut'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UpdateMonitorRequest:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 120
            - type: 'null'
          title: Name
        companies:
          anyOf:
            - items:
                $ref: '#/components/schemas/MonitorCompanyIn'
              type: array
              minItems: 1
            - type: 'null'
          title: Companies
          description: Replaces its companies.
        schedule:
          anyOf:
            - $ref: '#/components/schemas/ScheduleIn'
            - type: 'null'
        settings:
          anyOf:
            - $ref: '#/components/schemas/SettingsIn'
            - type: 'null'
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
          description: false pauses it, true resumes it.
        fill_gap:
          type: boolean
          title: Fill Gap
          description: >-
            With enabled true on a paused monitor: true covers the days it was
            paused (its next delivery brings what it missed, up to 30 days);
            false starts from today (only what is new from now).
          default: true
        query:
          anyOf:
            - type: string
              maxLength: 5000
            - type: 'null'
          title: Query
          description: >-
            A company monitor's query ("" for every story); a dataset monitor's
            research request.
      type: object
      title: UpdateMonitorRequest
      description: 'PATCH /monitors/{id}: only the fields given change.'
    MonitorOut:
      properties:
        monitor_id:
          type: string
          format: uuid
          title: Monitor Id
        name:
          type: string
          title: Name
        kind:
          type: string
          title: Kind
          description: companies or dataset.
          default: companies
        dataset:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Dataset
          description: >-
            Dataset monitors: topic, columns, mode, max_rows, source_run_id,
            window_to (where the last complete run ended).
        companies:
          items:
            additionalProperties:
              anyOf:
                - type: string
                - type: 'null'
            type: object
          type: array
          title: Companies
          description: 'Its companies now (a list monitor: its list''s).'
        list_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: List Id
          description: >-
            The company list it follows (companies added to or removed from the
            list are monitored from the next run on).
        query:
          anyOf:
            - type: string
            - type: 'null'
          title: Query
          description: >-
            What it watches for: a company monitor's query (null: every story),
            a dataset monitor's research request.
        schedule:
          additionalProperties: true
          type: object
          title: Schedule
        settings:
          additionalProperties: true
          type: object
          title: Settings
        enabled:
          type: boolean
          title: Enabled
        paused_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Paused Reason
          description: >-
            Why the service paused it: "out_of_credits" (its organization's
            credits no longer cover it; top up, then resume) or "idle" (the
            organization's free monitor, its results not opened for 14 days;
            resume it). Null when running or paused by its user.
        last_opened_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Opened At
          description: >-
            When its owner last opened its runs, stories or rows (the free
            monitor pauses after 14 days without).
        next_run_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Next Run At
          description: Next scheduled run (UTC).
        last_run_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Last Run Id
        source_run_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Run Id
          description: >-
            The run it was made from ("Keep updated", "Monitor this"): its first
            run.
        conversation_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Conversation Id
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - monitor_id
        - name
        - companies
        - schedule
        - settings
        - enabled
      title: MonitorOut
      description: A monitor.
    ErrorResponse:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
        - code
        - message
      title: ErrorResponse
      description: 'Every error: a stable code and a message to show the user.'
    MonitorCompanyIn:
      properties:
        domain:
          type: string
          title: Domain
          description: The company's website domain, e.g. stripe.com.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Its name, when the domain alone is ambiguous.
      type: object
      required:
        - domain
      title: MonitorCompanyIn
      description: A company to follow.
    ScheduleIn:
      properties:
        every:
          type: string
          enum:
            - day
            - week
            - hours
          title: Every
          default: day
        at:
          type: string
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
          title: At
          description: Local time, HH:MM (24-hour).
          default: '09:00'
        tz:
          type: string
          title: Tz
          description: IANA timezone, e.g. Europe/Berlin.
          default: UTC
        weekday:
          anyOf:
            - type: integer
              maximum: 6
              minimum: 0
            - type: 'null'
          title: Weekday
          description: 'Weekly only: 0 = Monday ... 6 = Sunday.'
        hours:
          anyOf:
            - type: integer
              maximum: 23
              minimum: 1
            - type: 'null'
          title: Hours
          description: >-
            every: hours only: hours between runs, counted from `at` each day.
            Refused with invalid_schedule below your plan's minimum interval (24
            hours on Free and PAYG).
      type: object
      title: ScheduleIn
      description: >-
        When the monitor runs: daily (default) or weekly at a local time in a
        timezone, or every few hours from that

        time when your plan allows runs more often than daily.
    SettingsIn:
      properties:
        include_market_activity:
          type: boolean
          title: Include Market Activity
          description: >-
            Also market_activity stories: stock moves and analyst ratings
            (hidden by default).
          default: false
      type: object
      title: SettingsIn
      description: What the monitor delivers.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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