---
title: "Create an endpoint monitor"
method: POST
path: "/api/v1/endpoints"
tags: ["endpoints"]
---

# Create an endpoint monitor

`POST /api/v1/endpoints`

## Request

- Base URL: `https://monit.rs`
- URL: `https://monit.rs/api/v1/endpoints`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `name` string, required
  - `url` string, uri, required
  - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS'
  - `headers` object
  - `body_template` string, nullable
  - `interval_seconds` integer
  - `openapi_spec_url` string, uri, nullable
  - `body_assertions` object[]: Assertions checked against the JSON response body on each probe. A failing assertion marks the endpoint DOWN.
    - `path` string, required
    - `op` 'contains' | 'empty' | 'equals' | 'exists' | 'gt' | 'gte' | 'lt' | 'lte' | 'not_contains' | 'not_empty' | 'not_equals' | 'not_exists', required
    - `value` unknown

## Response `201`

Created.

## Other responses

- `401`: Not authenticated.
- `403`: Missing write:endpoints scope OR tier endpoint-limit reached.
- `409`: Idempotency-Key reused with different body.
- `422`: Validation error.
- `429`: Rate limit exceeded.

---

[API](https://skmtc.dev/monit/apis/monit-rs-public-api.md) · [All operations](https://skmtc.dev/monit/apis/monit-rs-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/monit/apis/monit-rs-public-api/revisions/7e1923981112?raw)
