Skip to content

Create a monitor

POST
/monitors/create

Create an uptime monitor. Examples:

HTTPS + certificate expiry:

curl -X POST -H "X-API-Key: $ALERTKICK_API_KEY" -H "Content-Type: application/json" \
  "https://acme.alertkick.com/api/v1/monitors/create" -d '{
    "display_name": "Marketing site",
    "monitor_type": "http",
    "url": "https://example.com",
    "http_method": "GET",
    "check_interval_seconds": 300,
    "timeout_seconds": 30,
    "expected_status_code": 200,
    "ssl_cert_monitoring": true,
    "ssl_cert_expiry_alert_days": 14
  }'

Domain registration expiry:

curl -X POST -H "X-API-Key: $ALERTKICK_API_KEY" -H "Content-Type: application/json" \
  "https://acme.alertkick.com/api/v1/monitors/create" -d '{
    "display_name": "example.com registration",
    "monitor_type": "domain",
    "url": "example.com",
    "check_interval_seconds": 86400,
    "timeout_seconds": 30,
    "domain_expiry_alert_days": 30
  }'
object
display_name
required
string
Example
Marketing site
monitor_type
required

http/api check a URL. dns checks record resolution. tcp checks a port. domain checks domain registration expiry (use ssl_cert_monitoring on an http monitor for TLS certificate expiry).

string
Allowed values: http api dns tcp domain
url
required

Full URL for http/api; hostname for dns/tcp/domain.

string
Example
https://example.com
http_method

Required for http/api monitors.

string
Allowed values: GET POST PUT PATCH DELETE HEAD OPTIONS
check_interval_seconds

Seconds between checks. Plans may enforce a minimum; values below the plan floor are clamped up, not rejected.

integer
Example
300
timeout_seconds
integer
Example
30
expected_status_code

Required for http/api monitors; defaults to 200 otherwise.

integer
Example
200
expected_response_contains

Alert unless the response body contains this string.

string
request_body
string
headers
object
key
additional properties
string
auth

Basic or bearer auth for the checked endpoint.

object
type
string
Allowed values: basic bearer
username
string
password
string
token
string
tcp_port

Required for tcp monitors.

integer
dns_record_type
string
Example
A
expected_dns_host
string
ssl_cert_monitoring
boolean
ssl_cert_expiry_alert_days

Alert this many days before the TLS certificate expires.

integer
domain_expiry_alert_days

For domain monitors: alert this many days before the registration expires. Default 30.

integer
>= 1 <= 365
response_time_alert_ms

Alert when successful checks exceed this response time for failure_threshold consecutive checks. 0 or omitted = disabled.

integer
failure_threshold

Consecutive failures before alerting. Default 3.

integer
escalation_policy_uuid

Defaults to the account’s default escalation policy.

string
locations

Check locations, e.g. [“us-east”, “eu-west”].

Array<string>

Monitor created.

object
uuid
string
display_name
string
label
string
message
string

Validation error.

object
error
string
message
string
key
additional properties
any

Plan limit reached — upgrade to add more.

object
error
string
message
string
key
additional properties
any