Create monitor

Creates a monitor. The plan's monitor cap and the per-account distinct-target-host cap (both from the plan) return 422 plan_limit; an alert channel id that does not belong to the account returns 404.

post/monitors

Request

  • Base URL: https://app.yoping.me/api/v1
  • URL: https://app.yoping.me/api/v1/monitors
  • Auth: API key in cookie yp_session

Request body

type'http' | 'keyword' | 'ssl' | 'ping' | 'tcp' required
namestring

Defaults to the target host when omitted.

targetstring required
http_method'GET' | 'HEAD' | 'POST'
interval_secondsinteger

Minimum and default are the plan's min_interval_seconds (300 on free, 60 on pro).

timeout_msinteger
accepted_statusesstring

Comma-separated tokens: a class (2xx-5xx), a 3-digit code (100-599), or an inclusive NNN-NNN range.

keywordstring

Required for type "keyword".

keyword_mode'present' | 'absent'

Required for type "keyword".

alert_channel_idsstring[]

Alert channels to attach. A channel id not owned by the account is a 404.

regionsstring[] nullable

Region codes to check from (see GET /regions). Omitted, null, or empty means automatic: the first max_regions active regions, tracked as the fleet changes. An explicit set is capped by the plan's max_regions and pinned — it does not adopt regions added later.

Response

Monitor created.

Changes

No recorded changes to this operation across all 1 revision of this API.