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

# Replace a fixed or rolling baseline



## OpenAPI

````yaml /api-reference/openapi.json post /render/monitors/{id}/baseline
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/{id}/baseline:
    post:
      tags:
        - Monitors
      summary: Replace a fixed or rolling baseline
      operationId: replaceMonitorBaseline
      parameters:
        - $ref: '#/components/parameters/MonitorId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - runId
              properties:
                runId:
                  type: string
                  format: uuid
              additionalProperties: false
      responses:
        '200':
          description: Baseline replaced
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    MonitorId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    MonitorResponse:
      type: object
      required:
        - success
        - monitor
      properties:
        success:
          type: boolean
          const: true
        monitor:
          $ref: '#/components/schemas/Monitor'
    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'
    MonitorDiff:
      type: object
      properties:
        mode:
          type: string
          enum:
            - pixel
            - perceptual
          default: perceptual
        visualization:
          type: string
          enum:
            - overlay
            - heatmap
            - mask
            - none
          default: overlay
      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'
    NotFound:
      description: Unknown or cross-account resource
      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.