---
title: "Send a synthetic success ping"
method: POST
path: "/api/v1/checks/{id}/test-ping"
tags: ["Checks"]
---

# Send a synthetic success ping

`POST /api/v1/checks/{id}/test-ping`

## Request

- Base URL: `https://app.lastping.dev`
- URL: `https://app.lastping.dev/api/v1/checks/{id}/test-ping`
- Auth: API key in cookie `lp_session`

**Session-only console convenience** — proves the ping pipeline works
end to end before the monitored job is wired up. Enqueues a
synthetic success ping through the exact same path a
real ping takes; the response returns before the ping has
necessarily been processed, so `last_ping_at` on `GET
/api/v1/checks/{id}` may take a moment to update.

On a monitor that is currently down, this success ping resolves the
open incident and sends a recovery alert to every attached
destination, exactly as a real ping would — it is not a no-op probe.

**Session-authenticated only**: an API-key request gets 403
`SESSION_ONLY`, never 404 — an API key scripting a fake success would
let an agent silence its own monitor without ever running the job it
guards. Being a write, it also requires the CSRF double-submit
header: 403 `CSRF_REQUIRED` if `X-CSRF-Token` is missing or does not
match the `lp_csrf` cookie.

Refused with 400 `TEST_PING_NOT_SUPPORTED` for an `http` monitor: its
liveness comes from the server's own probe, not an inbound ping, so a
synthetic success ping would assert nothing real.

Rate-limited to **one test ping per check per 5 seconds** — a repeat
within the window gets 429 with `Retry-After: 5`, and the earlier
call still stands (the retry is not accepted). 503
`PING_QUEUE_UNAVAILABLE` when the ping queue could not be reached at
all.

## Response `202`

The synthetic ping was enqueued.

- TestPing: The body of the 202 response from POST /api/v1/checks/{id}/test-ping.
  - `ping_url` string, uri, required: The same success-ping URL GET .../ping-instructions returns for this check.

## Other responses

- `400`: id is not a valid UUID, or the check is an http monitor (`TEST_PING_NOT_SUPPORTED`).
- `403`: The request used an API key rather than a session cookie (`SESSION_ONLY`), or the session request was missing a valid `X-CSRF-Token` header (`CSRF_REQUIRED`).
- `404`: Check not found in this project.
- `429`: A test ping was already sent for this check in the last 5 seconds (`TEST_PING_RATE_LIMITED`).
- `503`: The ping queue is unavailable (`PING_QUEUE_UNAVAILABLE`).

---

[API](https://skmtc.dev/lastping/apis/lastping-management-api.md) · [All operations](https://skmtc.dev/lastping/apis/lastping-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lastping/apis/lastping-management-api/revisions/bbc6eda91c46?raw)
