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

# Create a monitor



## OpenAPI

````yaml /api-reference/openapi.json post /render/monitors
openapi: 3.1.0
info:
  title: Scrinly Browser API
  version: 1.0.0
  description: >-
    Public screenshot, region, Visual Style Guide, visual diff, monitoring,
    batch, job-status, and usage API.
servers:
  - url: https://api.scrinly.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Screenshots
  - name: Batches
  - name: Diffs
  - name: Jobs
  - name: Usage
  - name: Monitors
  - name: Recipients
paths:
  /render/monitors:
    post:
      tags:
        - Monitors
      summary: Create a monitor
      operationId: createMonitor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorWrite'
      responses:
        '201':
          description: Monitor created and baseline queued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/PlanRestricted'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    MonitorWrite:
      type: object
      required:
        - name
        - url
        - intervalMinutes
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        url:
          type: string
          format: uri
          pattern: ^https?://
          writeOnly: true
        intervalMinutes:
          type: integer
          minimum: 1
          maximum: 43200
        baselineMode:
          type: string
          enum:
            - rolling
            - fixed
          default: rolling
        changeThreshold:
          type: number
          minimum: 0
          maximum: 1
          default: 0.01
        capture:
          $ref: '#/components/schemas/MonitorCapture'
        diff:
          $ref: '#/components/schemas/MonitorDiff'
        alerts:
          $ref: '#/components/schemas/MonitorAlerts'
      additionalProperties: false
    MonitorResponse:
      type: object
      required:
        - success
        - monitor
      properties:
        success:
          type: boolean
          const: true
        monitor:
          $ref: '#/components/schemas/Monitor'
    MonitorCapture:
      type: object
      properties:
        fullPage:
          type: boolean
          default: true
        regions:
          type: boolean
          default: false
        format:
          type: string
          enum:
            - jpg
            - png
          default: jpg
        quality:
          type: integer
          minimum: 1
          maximum: 100
          default: 80
        device:
          type: string
        width:
          type: integer
        height:
          type: integer
        theme:
          type: string
          enum:
            - light
            - dark
        timeout:
          type: integer
          minimum: 10
          maximum: 60
        waitUntil:
          type: string
          enum:
            - load
            - domcontentloaded
            - networkidle0
            - networkidle2
        hideSelectors:
          type: array
          items:
            type: string
        clickSelectors:
          type: array
          items:
            type: string
          writeOnly: true
        headers:
          type: object
          additionalProperties:
            type: string
          writeOnly: true
        cookies:
          type: array
          items:
            $ref: '#/components/schemas/Cookie'
          writeOnly: true
        storage_provider:
          type: string
          enum:
            - b2
            - s3
            - r2
        storage_path:
          type: string
      additionalProperties: true
    MonitorDiff:
      type: object
      properties:
        mode:
          type: string
          enum:
            - pixel
            - perceptual
          default: perceptual
        visualization:
          type: string
          enum:
            - overlay
            - heatmap
            - mask
            - none
          default: overlay
      additionalProperties: false
    MonitorAlerts:
      type: object
      properties:
        email:
          type: object
          properties:
            account:
              type: boolean
              default: true
            recipientIds:
              type: array
              maxItems: 5
              items:
                type: string
                format: uuid
        webhook:
          type: object
          properties:
            url:
              type: string
              format: uri
              writeOnly: true
            secret:
              type:
                - string
                - 'null'
              writeOnly: true
    Monitor:
      type: object
      required:
        - id
        - name
        - status
        - intervalMinutes
        - baselineMode
        - changeThreshold
        - capture
        - diff
        - createdAt
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        status:
          type: string
          enum:
            - active
            - paused
            - paused_plan_limit
            - deleted
        intervalMinutes:
          type: integer
        baselineMode:
          type: string
          enum:
            - rolling
            - fixed
        changeThreshold:
          type: number
        capture:
          type: object
          additionalProperties: true
        diff:
          $ref: '#/components/schemas/MonitorDiff'
        alerts:
          type: object
          additionalProperties: true
        baselineRunId:
          type:
            - string
            - 'null'
          format: uuid
        nextRunAt:
          type:
            - string
            - 'null'
          format: date-time
        lastRunAt:
          type:
            - string
            - 'null'
          format: date-time
        incident:
          type:
            - object
            - 'null'
          additionalProperties: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          type: string
        type:
          type: string
        code:
          type: string
        retryable:
          type: boolean
        fields:
          type: array
          items:
            $ref: '#/components/schemas/ErrorField'
        credits:
          $ref: '#/components/schemas/Credits'
    Cookie:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
        value:
          type: string
          writeOnly: true
        domain:
          type: string
        path:
          type: string
        httpOnly:
          type: boolean
        secure:
          type: boolean
        sameSite:
          type: string
          enum:
            - Strict
            - Lax
            - None
      additionalProperties: false
    ErrorField:
      type: object
      required:
        - field
        - message
      properties:
        field:
          type: string
        message:
          type: string
    Credits:
      type: object
      required:
        - charged
        - refunded
        - net
      properties:
        charged:
          type: integer
          minimum: 0
        refunded:
          type: integer
          minimum: 0
        net:
          type: integer
          minimum: 0
  responses:
    BadRequest:
      description: Validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Invalid or missing Scrinly key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: Credit allowance exhausted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PlanRestricted:
      description: Plan does not allow the requested monitor capacity or cadence
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: Required platform configuration or provider unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Scrinly API key

````

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