> ## 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.

# Create Monitor

> Creates a new monitor from a query. If a URL is included in the query, the monitor focuses on that URL. Frequency is provided as natural-language schedule text and defaults to UTC when no timezone is specified. Use output_schema to enforce structured extraction outputs. Provisions monitor resources, starts periodic execution, and configures email, webhook, or SMS (phone_number) notifications.



## OpenAPI

````yaml openapi/monitors.json POST /v1/monitors
openapi: 3.0.3
info:
  title: Monitors API
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/monitors:
    post:
      summary: Create Monitor
      description: >-
        Creates a new monitor from a query, provisions internal resources,
        triggers initial planning, and configures recurring execution. If the
        query includes a URL, the monitor will focus on that URL. Frequency
        accepts natural-language schedule instructions and defaults to UTC when
        no timezone is provided.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                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.
                email:
                  type: string
                  description: >-
                    Notification email. Mutually exclusive with webhook_url and
                    phone_number.
                webhook_url:
                  type: string
                  format: uri
                  description: >-
                    Notification webhook URL (http/https). Mutually exclusive
                    with email and phone_number.
                phone_number:
                  type: string
                  description: >-
                    Notification phone number in E.164 format (for example:
                    '+14155552671'). When provided, notifications are sent via
                    SMS. Mutually exclusive with email and webhook_url.
                  pattern: ^\+[1-9]\d{1,14}$
                metadata:
                  type: object
                  additionalProperties: true
                output_schema:
                  type: object
                  description: >-
                    Optional JSON schema used to enforce structured monitor
                    extraction output.
                  additionalProperties: true
              required:
                - query
                - frequency
      responses:
        '202':
          description: Monitor accepted and activated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                    example: monitor
                  status:
                    type: string
                    example: active
                  fda_id:
                    type: string
                  query:
                    type: string
                  frequency:
                    type: string
                    description: >-
                      Natural-language schedule instruction. Interpreted by the
                      scheduler; defaults to UTC if no timezone is provided.
                  cron_expression:
                    type: string
                  notification_channel:
                    type: string
                    enum:
                      - email
                      - webhook
                      - sms
                  notification_target:
                    type: string
                  metadata:
                    type: object
                    additionalProperties: true
                  output_schema:
                    type: object
                    additionalProperties: true
                    nullable: true
                  created:
                    type: integer
                  updated:
                    type: integer
        '400':
          description: >-
            Invalid request body (missing query, malformed frequency
            instruction, invalid notification configuration, invalid metadata,
            or invalid output_schema).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid API key.
        '500':
          description: Internal server error while creating monitor.
      security:
        - Authorization: []
components:
  schemas:
    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.

````