Skip to content

Create a check

POST
/api/v1/projects/{projectId}/checks
curl --request POST \
--url https://app.monitorly.cloud/api/v1/projects/PROJECT_ID/checks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "intervalSecs": 30, "kind": { "assertions": [ { "op": "eq", "target": "status", "value": 200 }, { "op": "equals", "path": "$.db", "target": "json", "value": "ok" } ], "maxRedirects": 0, "method": "GET", "type": "http", "url": "https://api.acme.io/healthz" }, "name": "payments-health", "nodes": [ "NODE_ID_HEL", "NODE_ID_FRA", "NODE_ID_AMS" ] }'

Creates a check in the project. Every kind but heartbeat and server needs nodes: list them with List nodes and pick the locations. Missing settings take their defaults: a 10 s timeout, a quorum of half the locations, two rounds to go down and two to recover.

A heartbeat check answers its ping URL once, in pingUrl. Setting escalationPolicyId with a token also needs alerts:write. Validation errors point at the field (check.* codes, 422).

projectId
required
string format: uuid

The project’s id.

Example

PROJECT_ID
Idempotency-Key
string
>= 1 characters <= 255 characters

Any 1–255 characters, for example a UUID per intended action. A retry with the same key and the same request answers the stored response and creates nothing again; the same key with another request answers 422 request.idempotency_key_reused. Keys are kept for 24 hours.

Media typeapplication/json

A check as created or replaced. Defaults: timeout 10 s, quorum of half, 2 rounds to DOWN and 2 to recover, alerts by the project’s escalation policy.

object
downAfter
integer format: int32
escalationPolicyId

The escalation policy of the check’s incidents instead of the project’s; absent or null: the project’s.

string | null format: uuid
intervalSecs

Required except for heartbeat checks, whose schedule is kind.periodSecs.

integer | null format: int32
kind
required
One of:
object
assertions
Array
One of:
object
op
required
string
Allowed values: eq ne lt le gt ge
target
required
string
Allowed values: status
value
required
integer format: int32
body
string | null
degradedAfterMs

Response time above this marks the run DEGRADED.

integer | null format: int32
headers
Array<object>
object
name
required
string
value
required
One of:
object
kind
required
string
Allowed values: plain
value
required
string
maxRedirects
required
integer format: int32
method
required
string
Allowed values: GET HEAD POST PUT PATCH DELETE OPTIONS
url
required
string
type
required
string
Allowed values: http
muted
boolean
name
required
string
nodes

Nodes that run the check; none for heartbeat checks.

Array<string>
quorum
One of:

F ≥ ⌈M/2⌉ and F ≥ min(2, S).

object
mode
required
string
Allowed values: half
timeoutMs
integer format: int32
upAfter
integer format: int32

Example

{
"intervalSecs": 30,
"kind": {
"assertions": [
{
"op": "eq",
"target": "status",
"value": 200
},
{
"op": "equals",
"path": "$.db",
"target": "json",
"value": "ok"
}
],
"maxRedirects": 0,
"method": "GET",
"type": "http",
"url": "https://api.acme.io/healthz"
},
"name": "payments-health",
"nodes": [
"NODE_ID_HEL",
"NODE_ID_FRA",
"NODE_ID_AMS"
]
}

The check as stored; pingUrl only for a new heartbeat check.

Media typeapplication/json

Answer of create, replace and token rotation. pingUrl appears only when a heartbeat token was just made: it is shown once.

object
check
required

A stored check as answered by the API.

object
createdAt
required
string
downAfter
required
integer format: int32
epoch
required

Bumped whenever a change alters the check’s meaning; results of other epochs never vote.

integer format: int64
escalationPolicyId

The check’s own escalation policy; null: the project’s (ProjectView.escalationPolicyId).

string | null format: uuid
id
required
string format: uuid
intervalSecs
required
integer format: int32
kind
required
One of:
object
assertions
Array
One of:
object
op
required
string
Allowed values: eq ne lt le gt ge
target
required
string
Allowed values: status
value
required
integer format: int32
body
string | null
degradedAfterMs

Response time above this marks the run DEGRADED.

integer | null format: int32
headers
Array<object>
object
name
required
string
value
required
One of:
object
kind
required
string
Allowed values: plain
value
required
string
maxRedirects
required
integer format: int32
method
required
string
Allowed values: GET HEAD POST PUT PATCH DELETE OPTIONS
url
required
string
type
required
string
Allowed values: http
managedBy

config when a config apply manages the check (only those are pruned), ui otherwise. Always sent; optional in the schema because it was added after the first clients.

string
Allowed values: ui config
muted
required
boolean
name
required
string
nodes
required
Array<string>
paused
required
boolean
projectId
required
string format: uuid
quorum
required
One of:

F ≥ ⌈M/2⌉ and F ≥ min(2, S).

object
mode
required
string
Allowed values: half
ref

The check’s key in a config file (monitorly.yaml); null until a config apply creates or adopts it. Always sent; optional in the schema because it was added after the first clients.

string | null
timeoutMs
required
integer format: int32
upAfter
required
integer format: int32
updatedAt
required
string
pingUrl
string | null

Example

{
"check": {
"createdAt": "2026-11-02T09:14:00Z",
"downAfter": 2,
"epoch": 1,
"escalationPolicyId": null,
"id": "CHECK_ID",
"intervalSecs": 30,
"kind": {
"assertions": [
{
"op": "eq",
"target": "status",
"value": 200
},
{
"op": "equals",
"path": "$.db",
"target": "json",
"value": "ok"
}
],
"maxRedirects": 0,
"method": "GET",
"type": "http",
"url": "https://api.acme.io/healthz"
},
"managedBy": "ui",
"muted": false,
"name": "payments-health",
"nodes": [
"NODE_ID_HEL",
"NODE_ID_FRA",
"NODE_ID_AMS"
],
"paused": false,
"projectId": "PROJECT_ID",
"quorum": {
"mode": "half"
},
"timeoutMs": 10000,
"upAfter": 2,
"updatedAt": "2026-11-02T09:14:00Z"
}
}

Bad Request.

  • request.malformed: the body or a parameter is not of the expected shape
  • request.idempotency_key_invalid: the key is empty or longer than 255 characters
  • auth.credentials_conflict: the request carries both a session cookie and a token
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Unauthorized.

  • auth.unauthenticated, auth.session_expired: no session, or it ended
  • token.invalid: the token is malformed, unknown, revoked or expired, or its creator left the workspace
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Forbidden.

  • auth.forbidden: your role is too low for this
  • token.scope_missing: the token lacks the scope this needs; detail names it
  • request.origin_mismatch, request.header_required: a changing request with a session comes from another site or lacks X-Monitorly-Request: 1
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example

{
"detail": "this token needs the scope checks:write",
"errors": [],
"status": 403,
"title": "Forbidden",
"type": "token.scope_missing"
}

Not Found.

  • request.not_found: it does not exist, or you cannot see it
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Conflict.

  • quota.checks_reached: the workspace has as many checks as its plan allows
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example

{
"detail": "the workspace already runs as many checks as the Team plan allows (100); pause another check first, or the Business plan allows more: upgrade the plan in the workspace settings (Plan & billing)",
"errors": [],
"status": 409,
"title": "Conflict",
"type": "quota.checks_reached"
}

Payload Too Large.

  • request.too_large: the body is larger than 256 KiB
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Unprocessable Entity.

  • field.required, field.too_long, field.invalid: a field breaks a rule; errors points at it
  • quota.interval_too_short: the interval (a heartbeat’s period) is shorter than the plan allows; the shortest is in params.min. Existing checks keep theirs
  • check.node_unavailable: node does not exist, is revoked, or is a private node of another workspace
  • check.target_blocked: the check runs on a platform node and its target is blocked on Monitorly Cloud; the pointer is on the target’s field
  • check.server_taken: another server check already watches this node (/kind/nodeId)
  • escalation_policy.unknown: escalationPolicyId is not a policy of this workspace
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example

{
"detail": null,
"errors": [
{
"code": "check.invalid_url",
"params": {},
"pointer": "/kind/url"
}
],
"status": 422,
"title": "Unprocessable Entity",
"type": "check.invalid_url"
}

Too Many Requests.

  • token.rate_limited: more than 10 requests a second with this token
  • session.rate_limited: more than 5 changes a second from your sessions
  • token.create_limited: more than 30 resources created within an hour from one token; Retry-After in seconds
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}
Retry-After
integer
>= 1

Seconds to wait before trying again.