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

# Create a monitor

> Create a recurring monitor for a public page.



## OpenAPI

````yaml POST /v1/api/monitors
openapi: 3.1.0
info:
  title: PagePith API
  version: 0.1.0
  description: >-
    Turn any web page into clean, structured content. The API handles
    JavaScript-rendered sites, PDFs, and most bot-protected pages, returning
    readable markdown. Authenticate with your API key as a Bearer token. Usage
    is billed per successful scrape.
servers:
  - url: https://api.pagepith.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Scrape
    description: Fetch and convert web pages
  - name: Video
    description: Transcribe public YouTube, Instagram, and TikTok videos
  - name: Monitoring
    description: Watch public pages for content changes
  - name: Blog
    description: Read published PagePith engineering articles
paths:
  /v1/api/monitors:
    post:
      tags:
        - Monitoring
      summary: Create a monitor
      description: >-
        Creates a recurring public-page monitor. The first successful check
        establishes a baseline and does not notify.
      operationId: createMonitor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMonitorRequest'
            example:
              url: https://example.com/pricing
              notifications:
                email: true
      responses:
        '201':
          description: Monitor created.
          content:
            application/json:
              schema:
                type: object
                required:
                  - monitor
                properties:
                  monitor:
                    $ref: '#/components/schemas/Monitor'
                  webhookSecret:
                    type: string
                    description: Generated webhook signing secret. Returned once.
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
components:
  schemas:
    CreateMonitorRequest:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          format: uri
        notifications:
          type: object
          properties:
            email:
              type: boolean
              default: true
            webhook:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  format: uri
                secret:
                  type: string
                  minLength: 16
                  maxLength: 256
    Monitor:
      type: object
      required:
        - id
        - url
        - status
        - lastCheckedAt
        - lastChangedAt
        - consecutiveFailures
        - createdAt
        - updatedAt
        - channels
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
          format: uri
        status:
          type: string
          enum:
            - active
            - paused
        lastCheckedAt:
          type:
            - string
            - 'null'
          format: date-time
        lastChangedAt:
          type:
            - string
            - 'null'
          format: date-time
        consecutiveFailures:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        channels:
          type: array
          items:
            type: object
            required:
              - id
              - type
              - destination
              - enabled
            properties:
              id:
                type: string
                format: uuid
              type:
                type: string
                enum:
                  - email
                  - webhook
              destination:
                type: string
              enabled:
                type: boolean
  responses:
    InvalidRequest:
      description: The request body failed validation.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - invalid_request
              details:
                type: object
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - unauthorized
              message:
                type: string
    PaymentRequired:
      description: No active subscription or usage allowance remaining.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - payment_required
              message:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key as a Bearer token: `Authorization: Bearer <api-key>`.'

````