Update a check
Partially updates a monitor using JSON Merge Patch semantics (RFC 7396):
- Omitted field — the stored value is left unchanged.
- Explicit null — clears the value. Supported on runaway_ceiling, max_runtime_s, step_timeout_s, blocked_timeout_s, expect_every_s, notify_min_run_s, monitor_from, ci_workflow, ci_branch, tags, agent_id, source_kind and source_ref only — the same thirteen properties typed to allow null in the CheckPatch schema; for tags, explicit null is equivalent to sending []; for blocked_timeout_s, explicit null does not mean "wait forever" — it restores the 24h default, same as omitting the field; for agent_id, explicit null detaches the monitor from its agent without deleting either of them; for the source pair, null must be sent on both keys, since a half-cleared discovery identity reconciles against nothing and is rejected with 400 (SOURCE_INCOMPLETE). failure_threshold is NOT clearable (it always has a value, default 1); a null there is treated as omission.
- Any other value — replaces the stored value.
Changing failure_threshold does not reset consecutive_failures: lowering it means "that many failures is now enough", so a monitor already at or above the new threshold alerts on its next failure.
tags is replaced wholesale, not merged; send [] or null to remove all tags. slug, monitor_type and ci_secret are immutable and are ignored if present. ci_provider is immutable too, but on a monitor with no CI binding it is now rejected with 400 (FIELD_NOT_IN_SHAPE) rather than accepted and ignored — see the CheckPatch schema.
ci_workflow, ci_branch, source_kind and source_ref deliberately deviate from strict RFC 7396: an explicit empty string "" preserves the stored value, the same as omitting the field. This protects full-body clients (e.g. Terraform) that always send "" for an unset attribute from silently unbinding a live CI filter — or, for the source pair, from destroying a monitor's discovery identity, after which the next scan no longer recognises the source and creates a second monitor for it. Explicit null is the documented way to clear any of these fields.
Sending a complete body remains valid and behaves as a full replace.
Request
- Base URL: https://app.lastping.dev
- URL: https://app.lastping.dev/api/v1/checks/{id}
- Auth: API key in header X-Api-Key
Request body
Example request
{
"name": "Daily backup job",
"schedule_kind": "simple",
"period_s": 86400,
"cron_expr": "0 3 * * *",
"tz": "Europe/London",
"grace_s": 600,
"max_runtime_s": 14400,
"step_timeout_s": 300,
"expect_every_s": 900,
"notify_min_run_s": 300,
"blocked_timeout_s": 86400,
"failure_threshold": 3,
"monitor_from": "2026-01-01T00:00:00Z",
"probe_url": "https://example.com/healthz",
"probe_method": "GET",
"probe_expected_body": "\"status\":\"ok\"",
"probe_interval_s": 60,
"probe_expected_status": 200,
"probe_timeout_s": 10,
"ci_workflow": "ci.yml",
"ci_branch": "main",
"runaway_ceiling": 20,
"tags": [
"agent:claude",
"env:prod"
],
"agent_id": "nightly-etl-bot",
"source_kind": "github-actions",
"source_ref": ".github/workflows/nightly.yml#build",
"trace_content": "redacted"
}Response
Updated check.
Example response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Daily backup job",
"slug": "daily-backup",
"schedule_kind": "simple",
"period_s": 86400,
"cron_expr": "0 3 * * *",
"tz": "UTC",
"grace_s": 600,
"max_runtime_s": 14400,
"step_timeout_s": 300,
"expect_every_s": 900,
"notify_min_run_s": 300,
"blocked_timeout_s": 86400,
"failure_threshold": 3,
"monitor_from": "2026-01-01T00:00:00Z",
"status": "up",
"last_ping_at": "2026-07-10T03:00:05Z",
"due_at": "2026-07-11T03:00:00Z",
"alert_after": "2026-07-11T03:10:00Z",
"maintenance_until": "2026-07-11T09:00:00Z",
"created_at": "2026-07-01T12:00:00Z",
"ping_url": "https://ingest.lastping.dev/550e8400-e29b-41d4-a716-446655440000",
"monitor_type": "http",
"probe_url": "https://example.com/healthz",
"probe_method": "GET",
"probe_expected_body": "\"status\":\"ok\"",
"probe_interval_s": 60,
"probe_expected_status": 200,
"probe_timeout_s": 10,
"next_probe_at": "2026-07-13T03:01:00Z",
"ci_provider": "github",
"ci_configured": true,
"ci_webhook_url": "https://ingest.lastping.dev/ci/github/550e8400-e29b-41d4-a716-446655440000",
"ci_secret": "a3f8c2d1e4b7a9f0c3d2e1b4a7f8c0d3e2b1a4f7",
"ci_workflow": "ci.yml",
"ci_branch": "main",
"ci_ignored": {
"count": 12,
"last_at": "2026-10-08T14:02:11Z",
"last_workflow": "CI",
"last_branch": "feature/login",
"last_matched_at": "2026-10-01T09:00:00Z",
"filters_changed_at": "2026-09-20T12:00:00Z",
"same_workflow_count": 3,
"same_workflow_last_at": "2026-10-08T11:40:00Z",
"same_workflow_last_branch": "release/2.4",
"new_workflow": "Deploy prod",
"new_workflow_first_at": "2026-10-06T09:12:00Z",
"new_workflow_count": 2
},
"runaway_ceiling": 20,
"tags": [
"agent:claude",
"env:prod"
],
"agent_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"source_kind": "github-actions",
"source_ref": ".github/workflows/nightly.yml#build",
"trace_content": "dropped",
"kind": "cron",
"uptime_90d": 99.67,
"latency_ms": 142,
"routes_count": 2,
"recent_outcomes": [
"succeeded",
"succeeded",
"failed"
],
"hook_version": 2,
"hook_version_current": 2
}Changes
No recorded changes to this operation across all 2 revisions of this API.