Create an API check

Creates a new API check. Will return a 402 when you are over the limit of your plan. When using the globalAlertSetting, the alertSetting can be null

Query Params
boolean
Defaults to true

Determines whether a new check will automatically be added as a subscriber to all existing alert channels when it gets created.

Body Params
string
required

The name of the check.

boolean
Defaults to true

Determines if the check is running or not.

boolean
Defaults to false

Determines if any notifications will be send out when a check fails and/or recovers.

boolean
Defaults to true

[Deprecated] Retry failed check runs. This property is deprecated, and retryStrategy can be used instead.

boolean
Defaults to false

Allows to invert the behaviour of when a check is considered to fail. Allows for validating error status like 404.

locations
array of objects

An array of one or more data center locations where to run this check.

locations
tags
array of strings

Tags for organizing and filtering checks.

tags
alertSettings
object

Alert settings.

boolean
Defaults to true

When true, the account level alert setting will be used, not the alert setting defined on this check.

number
Defaults to null

The id of the check group this check is part of.

number
≥ 0
Defaults to null

The position of this check in a check group. It determines in what order checks are run when a group is triggered from the API or from CI/CD.

string
enum
Defaults to null

The runtime version, i.e. fixed set of runtime dependencies, used to execute this check.

Allowed:
alertChannelSubscriptions
array of objects

List of alert channel subscriptions.

alertChannelSubscriptions
retryStrategy
object

The strategy to determine how failed checks are retried.

triggerIncident
object

Determines whether the check or monitor should create and resolve an incident based on its alert configuration. Useful for status page automation.

boolean
Defaults to false

When true, the check will run in parallel in all selected locations.

request
object
required

Determines the request that the check is going to run.

integer
enum
Defaults to 10

How often the check should run in minutes.

integer
≥ 1

Used for setting seconds for check frequencies under 1 minutes (only for API & TCP checks) and spreading checks over a time range for frequencies over 1 minute. This works as follows: Checks with a frequency of 0 can have a frequencyOffset of 10, 20 or 30 meaning they will run every 10, 20 or 30 seconds. Checks with a frequency lower than and equal to 60 can have a frequencyOffset between 1 and a max value based on the formula "Math.floor(frequency * 10)", i.e. for a check that runs every 5 minutes the max frequencyOffset is 50. Checks with a frequency higher than 60 can have a frequencyOffset between 1 and a max value based on the formula "Math.ceil(frequency / 60)", i.e. for a check that runs every 720 minutes, the max frequencyOffset is 12.

number
0 to 30000
Defaults to 5000

The response time in milliseconds where a check should be considered degraded.

number
0 to 30000
Defaults to 20000

The response time in milliseconds where a check should be considered failing.

privateLocations
array of strings

An array of one or more private locations where to run the check.

privateLocations
number
Defaults to null

An ID reference to a snippet to use in the teardown phase of an API check.

number
Defaults to null

An ID reference to a snippet to use in the setup phase of an API check.

string
Defaults to null

A valid piece of Node.js code to run in the setup phase.

string
Defaults to null

A valid piece of Node.js code to run in the teardown phase.

Headers
string

Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general

Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json