Skip to content

Heartbeat URL retrieval and ingestion

GET /api/v1/checks/:id/ping_urls / MCP get_check_ping_urls. Requires checks:ping_urls, current operational-credential permission and a heartbeat check. Other kinds return invalid_kind.

{
"id": "check_EXAMPLE",
"sensitive": true,
"locations": [
{
"name": "default",
"url": "https://pingstack.io/ping/LOCATION_TOKEN",
"start_url": "https://pingstack.io/ping/LOCATION_TOKEN/start",
"fail_url": "https://pingstack.io/ping/LOCATION_TOKEN/fail"
}
]
}

Each location has three URLs. url reports a successful run, start_url records that a run began (see report a start), and fail_url marks the location failed right away (see report a failure). They’re the same location URL with /start and /fail added, so an agent can wire up a job without building them.

Never display a real result in an AI conversation, public log or source file. Each URL grants reporting access. Ordinary check reads do not disclose it.

GET or POST the location URL. Ingestion uses the URL’s token, not the automation bearer token. These are separate credential types.

Input Behavior
Location token in path Required; unknown token returns 404
value query parameter Parsed as a floating-point number; malformed/missing values are ignored
exit_code query parameter Stored if present; does not determine status (use /fail to report a failure)
POST body JSON parsed when valid; otherwise retained as raw text
Terminal window
curl --fail --silent --show-error \
--request POST --header 'Content-Type: application/json' \
--data '{"processed":1200}' \
"$PINGSTACK_PING_URL?value=42&exit_code=0"

PINGSTACK_PING_URL must be the privately stored location URL. HTTP 200 means the ingestion request was accepted. For an active check, it records activity, marks the location up and recalculates health. For a paused check, it returns 200 without recording activity.

Malformed numeric input does not reject a heartbeat and does not clear the previous value. Numeric threshold health can therefore remain based on an earlier reported value. JSON/raw payloads are diagnostic data, not arbitrary status-setting instructions.

Ingestion is rate limited to 60 requests a minute for each ping URL, and to 1,200 requests a minute from one client IP address across all ping URLs. Excess requests return 429. This is separate from the automation grant/account limits. It is not a high-volume metrics ingestion API.

GET or POST <location URL>/fail reports that the job failed. It takes the same inputs as a heartbeat and returns the same responses: 200 when accepted, 404 for an unknown token, 429 over the shared rate limits, and 200 without recording anything for a paused check.

Terminal window
curl --fail --silent --show-error \
--request POST --header 'Content-Type: text/plain' --data-binary @last-lines.log \
"$PINGSTACK_PING_URL/fail?exit_code=2"

For an active check it records the activity, marks the location failed and recalculates health right away. A failed location counts as not checked in; on a single-location check that makes the check down and opens an incident. The next heartbeat to the plain URL marks the location up again.

GET or POST <location URL>/start records that a run began. It returns the same responses as a heartbeat (200, 404 for an unknown token, 429 over the shared rate limits, 200 without recording anything for a paused check) and changes no status. The location’s next heartbeat or /fail stores the run’s duration as the result’s duration_ms, readable through list_check_runs. A start older than the location’s last report is ignored.

Terminal window
curl --fail --silent --show-error --request POST "$PINGSTACK_PING_URL/start"

Sending exit_code=1 to the plain URL records the code but still marks the location up. Use /fail for failures; see recipes.