---
title: "Create monitor"
method: POST
path: "/monitors"
tags: ["monitors"]
---

# Create monitor

`POST /monitors`

Create a new monitoring endpoint

## Request body

- CreateMonitorRequest
  - `name` string, required
  - `description` string, required
  - `type` 'http' | 'ping' | 'pagespeed' | 'hardware' | 'docker' | 'port', required
  - `url` string, uri, required
  - `interval` integer, required — Check interval in seconds
  - `isActive` boolean
  - `notifications` string[] — Array of notification IDs to associate with this monitor
  - `httpOptions` object
    - `method` 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD'
    - `headers` object
    - `body` string — Request body for POST/PUT requests
    - `timeout` integer — Request timeout in milliseconds
  - `assertions` object[]
    - `type` 'status-code' | 'response-time' | 'body-contains' | 'header-contains'
    - `comparison` 'equals' | 'not-equals' | 'greater-than' | 'less-than' | 'contains' | 'not-contains'
    - `value` string

## Response `201`

Monitor created successfully

- object
  - `success` boolean, required
  - `msg` string, required
  - `data` object — Response payload (varies by endpoint)
    - `_id` string
    - `userId` string
    - `teamId` string
    - `name` string
    - `description` string
    - `type` 'http' | 'ping' | 'pagespeed' | 'hardware' | 'docker' | 'port'
    - `url` string, uri
    - `interval` integer
    - `isActive` boolean
    - `status` boolean — Current monitor status (up/down)
    - `lastChecked` string, date-time — Timestamp of last check
    - `notifications` string[]
    - `httpOptions` object
      - `method` string
      - `headers` object
      - `body` string
      - `timeout` integer
    - `assertions` object[]
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `422` — Validation failed
- `500` — Internal server error

## Changes

- **2025-08-11** `db719f9e3d34` — 5 breaking, 7 warning, 15 info
  - request body became required
  - the request property `interval` became required
  - the `name` request property's minLength was increased from `0` to `1`
  - the `url` request property format changed from no format to `uri`
  - …23 more
- **2025-04-20** `b97ec6888b3c` — 46 breaking, 39 warning, 9 info
  - added the new required request property `teamId`
  - added the new required request property `userId`
  - removed `subschema #1, subschema #2` from the `description` request property `anyOf` list
  - the request property `description` became required
  - …90 more

[Change history](https://skmtc.dev/bluewave-labs/apis/checkmate-api/changes/monitors/post.md)

---

[API](https://skmtc.dev/bluewave-labs/apis/checkmate-api.md) · [All operations](https://skmtc.dev/bluewave-labs/apis/checkmate-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bluewave-labs/checkmate-api/revisions/5cc8875e6936/schema)
