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

# Update Monitor

> Updates monitor metadata and/or frequency. Frequency updates recreate the underlying schedule.

<Tip>
  **Merge semantics:** Metadata updates follow Stripe's approach — new keys are added, existing keys are updated, and keys set to empty string `""` are deleted.
</Tip>


## OpenAPI

````yaml openapi/monitors.json POST /v1/monitors/{monitor_id}
openapi: 3.0.3
info:
  title: Monitors API
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/monitors/{monitor_id}:
    post:
      summary: Update Monitor
      description: >-
        Updates monitor metadata and/or frequency. Frequency accepts
        natural-language schedule instructions and updates recreate the internal
        schedule. If no timezone is provided, UTC is used.
      parameters:
        - name: monitor_id
          in: path
          required: true
          description: Unique monitor identifier. Must start with monitor_.
          schema:
            type: string
            pattern: ^monitor_
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: object
                  additionalProperties: true
                  description: Metadata patch. Empty string values delete keys.
                frequency:
                  type: string
                  description: >-
                    Natural-language schedule instruction (for example: 'every
                    day at 9am America/Los_Angeles'). If no timezone is
                    specified, UTC is used.
      responses:
        '200':
          description: Monitor updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Monitor'
        '400':
          description: >-
            Invalid request, invalid monitor_id/frequency/metadata, or monitor
            already deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid API key.
        '404':
          description: Monitor not found.
        '500':
          description: Internal server error while updating monitor.
      security:
        - Authorization: []
components:
  schemas:
    Monitor:
      type: object
      properties:
        id:
          type: string
          description: Unique monitor identifier.
        object:
          type: string
          example: monitor
        team_id:
          type: string
        status:
          type: string
          description: >-
            Monitor lifecycle status. Common values: `active` (running on
            schedule), `paused` (schedule disabled via /pause, can be resumed
            via /resume), `deleted` (soft-deleted).
          enum:
            - active
            - paused
            - deleted
        fda_id:
          type: string
        query:
          type: string
          description: >-
            Monitoring intent in natural language. If the query includes a URL,
            the monitor will focus on that URL.
        frequency:
          type: string
          description: >-
            Natural-language schedule instruction (for example: 'every day at
            9am America/Los_Angeles' or 'every weekday at 14:30'). If no
            timezone is specified, UTC is used.
        cron_expression:
          type: string
          nullable: true
        notification_channel:
          type: string
          enum:
            - email
            - webhook
            - sms
        notification_target:
          type: string
        metadata:
          type: object
          additionalProperties: true
        output_schema:
          type: object
          description: >-
            Optional JSON schema used to enforce structured monitor extraction
            output.
          additionalProperties: true
          nullable: true
        error_message:
          type: string
          nullable: true
        created_at:
          type: integer
          description: Unix timestamp.
        updated_at:
          type: integer
          description: Unix timestamp.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.

````