Ping

Run a one-off HTTP, DNS, or TCP probe without creating a monitor. Built for CI checks against ephemeral deployments.

The ping endpoint runs a single probe against a target you describe in the request and returns the result. No monitor is created, no check history is stored, and no alerts are sent. Use it when the target is not worth monitoring continuously — a preview deployment that lives for the length of a build, a freshly provisioned subdomain, a smoke test in a release pipeline.

Every probe uses the same regions, timeouts, and status rules as the equivalent monitor, so an ad-hoc result predicts what continuous monitoring of the same target would report.

Request Failures Versus Target Failures

A target that is down still returns 200. The outcome of the probe is in data.ping.status, never in the HTTP status of the API response.

A non-2xx response from this endpoint means the request failed — a bad key, a missing scope, an inactive subscription, an invalid body, the rate limit, or the endpoint being unavailable to your team. It never means your target is down. Collapsing the two would make "your service is unreachable" indistinguishable from "we could not check", and only the first should fail a build.

Branch on the payload, not on the transport:

Terminal
status=$(curl -s https://uptime.sergiodxa.com/api/v1/ping \
  -H "Authorization: Bearer uptime_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"type":"http","url":"https://preview-1234.example.com/healthz"}' \
  | jq -r '.data.ping.status')

case "$status" in
  up)       echo "healthy" ;;
  degraded) echo "slow but correct" ;;
  *)        echo "unhealthy: $status"; exit 1 ;;
esac

Run a Ping

POST/api/v1/ping

Run one probe and get its result back. The body's type selects the kind of probe, and each kind's fields are described below.

Required scope: ping:trigger

Errors (6)
StatusTypeMeaning
400validation-errorThe request failed validation
401unauthorizedThe API key is missing or invalid
402subscription-requiredAn active subscription is required
403forbiddenThe API key lacks the required scope
429rate-limitedToo many requests
503endpoint-unavailableThe endpoint is unavailable to this team
Request body fields
  • type: httpobject
    Show nested fields
    • type"http"Required
    • urlstringRequired

      Format: uri.

    • methodstringDefault "GET"

      One of GET, POST, PUT, PATCH, DELETE, HEAD.

    • expectedStatusnumberDefault 200

      100–599.

    • timeoutSecondsnumberDefault 10

      1–60.

    • degradedAfterMsnumberDefault 5000

      1–60000.

    • regionstringDefault "wnam"

      One of wnam, enam, sam, weur, eeur, apac, oc, afr, me.

    • headersobject
    • bodystring

      Refused when method is GET or HEAD 0–10000 characters.

    • contentChecksobject[]Default []
      Show nested fields
      • typestringRequired

        One of contains, not_contains, regex.

      • valuestringRequired

        1–1000 characters.

      • caseSensitivebooleanDefault false
  • type: dnsobject
    Show nested fields
    • type"dns"Required
    • domainstringRequired

      1–255 characters.

    • recordTypestringDefault "A"

      One of A, AAAA, CNAME, MX, TXT, NS, CAA, TLSA, DS, SVCB.

    • expectedValuestring

      Comma-separated for multi-value records 0–1000 characters.

  • type: tcpobject
    Show nested fields
    • type"tcp"Required
    • hoststringRequired

      1–255 characters.

    • portnumberRequired

      1–65535.

    • timeoutMsnumberDefault 5000

      100–60000.

Response fields (200)
  • dataobjectRequired
    Show nested fields
    • pingobjectRequired
  • metaobjectRequired
    Show nested fields
    • requestIdstringRequired

      Format: uuid.

    • timestampstringRequired

      Format: date-time.

Run an HTTP Ping

Probe an HTTP endpoint once and classify the response.

Request Body

FieldTypeRequiredDescription
typestringYesMust be http
urlstringYesAbsolute URL to probe
methodstringNoGET, POST, PUT, PATCH, DELETE, or HEAD (default: GET)
expectedStatusintegerNoResponse status that counts as healthy (100-599, default: 200)
timeoutSecondsintegerNoProbe timeout in seconds (1-60, default: 10)
degradedAfterMsintegerNoResponse time above which a correct response is degraded (1-60000, default: 5000)
regionstringNoRegion to probe from (default: wnam)
headersobjectNoRequest headers, as string values keyed by header name
bodystringNoRequest body, up to 10,000 characters. Rejected with 400 when method is GET or HEAD, which cannot carry one
contentChecksarrayNoAssertions run against the response body; all must pass for the status to be up

Each entry in contentChecks is an object with type (contains, not_contains, or regex), value (1-1000 characters), and an optional caseSensitive flag (default: false).

Valid regions are wnam, enam, sam, weur, eeur, apac, oc, afr, and me.

cURL

Terminal
curl https://uptime.sergiodxa.com/api/v1/ping \
  -H "Authorization: Bearer uptime_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "http",
    "url": "https://preview-1234.example.com/healthz",
    "method": "GET",
    "expectedStatus": 200,
    "timeoutSeconds": 10,
    "degradedAfterMs": 5000,
    "region": "wnam",
    "headers": { "X-Deploy": "preview-1234" },
    "contentChecks": [{ "type": "contains", "value": "\"status\":\"ok\"" }]
  }'

Response

json
{
	"data": {
		"ping": {
			"id": "ping_abc123",
			"type": "http",
			"status": "up",
			"responseStatus": 200,
			"responseTimeMs": 143,
			"contentChecksPassed": true,
			"checkedAt": "2026-08-01T12:00:00Z"
		}
	},
	"meta": {
		"requestId": "9f1c5f0e-4d1a-4a51-9d3f-1a2b3c4d5e6f",
		"timestamp": "2026-08-01T12:00:00Z"
	}
}

A target that fails returns the same 200 envelope with a different status:

json
{
	"data": {
		"ping": {
			"id": "ping_abc124",
			"type": "http",
			"status": "down",
			"responseStatus": 503,
			"responseTimeMs": 87,
			"contentChecksPassed": false,
			"checkedAt": "2026-08-01T12:00:05Z"
		}
	},
	"meta": {
		"requestId": "0c7a6e11-2b8d-4f6c-88a1-77e3d2b91c04",
		"timestamp": "2026-08-01T12:00:05Z"
	}
}

Run a DNS Ping

Resolve a DNS record once and optionally compare it against an expected value.

Request Body

FieldTypeRequiredDescription
typestringYesMust be dns
domainstringYesDomain to resolve (1-255 characters)
recordTypestringNoRecord type (default: A)
expectedValuestringNoValue the record must resolve to (up to 1000 characters); comma-separated for multi-value

Valid record types are A, AAAA, CNAME, MX, TXT, NS, CAA, TLSA, DS, and SVCB.

Without expectedValue there is nothing to compare against, so a successful resolution is always ok and the changed status cannot occur.

cURL

Terminal
curl https://uptime.sergiodxa.com/api/v1/ping \
  -H "Authorization: Bearer uptime_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "dns",
    "domain": "preview-1234.example.com",
    "recordType": "A",
    "expectedValue": "203.0.113.10"
  }'

Response

json
{
	"data": {
		"ping": {
			"id": "ping_def456",
			"type": "dns",
			"status": "ok",
			"resolvedValue": "203.0.113.10",
			"responseTimeMs": 31,
			"errorMessage": null,
			"checkedAt": "2026-08-01T12:00:00Z"
		}
	},
	"meta": {
		"requestId": "1d4c9a72-6f0b-4e2d-9c31-58a0f4c7e2b9",
		"timestamp": "2026-08-01T12:00:00Z"
	}
}

A domain that does not resolve is not an error. It returns 200 with status error and an errorMessage.

Run a TCP Ping

Open a TCP connection to a host and port once, and report whether it was accepted.

Request Body

FieldTypeRequiredDescription
typestringYesMust be tcp
hoststringYesHostname or IP address (1-255 characters)
portintegerYesTCP port number (1-65535)
timeoutMsintegerNoConnection timeout in milliseconds (100-60000, default: 5000)

cURL

Terminal
curl https://uptime.sergiodxa.com/api/v1/ping \
  -H "Authorization: Bearer uptime_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "tcp",
    "host": "db.preview-1234.example.com",
    "port": 5432,
    "timeoutMs": 5000
  }'

Response

json
{
	"data": {
		"ping": {
			"id": "ping_ghi789",
			"type": "tcp",
			"status": "up",
			"responseTimeMs": 42,
			"errorMessage": null,
			"checkedAt": "2026-08-01T12:00:00Z"
		}
	},
	"meta": {
		"requestId": "5b2e8f30-91cd-4a77-b0a4-6c1e9d3f8210",
		"timestamp": "2026-08-01T12:00:00Z"
	}
}

A refused connection returns 200 with status down; a connection that never completes returns 200 with status timeout.

Rate Limits

Ad-hoc pings are limited to 60 requests per minute per API key. The limit is per key rather than per source address, so pipelines sharing an egress address do not consume each other's budget. Exceeding it returns a 429 rate-limited problem; no probe is performed and nothing is billed. See Rate Limits for the RateLimit headers this endpoint sends.

Billing

Every accepted ping is billable and counts against the same metered ping allowance as monitor checks: the pings included in your subscription first, then whole blocks of additional pings. Requests refused before the probe runs — invalid body, missing scope, inactive subscription, rate limited — are not counted.

Ad-hoc pings belong to a team but to no monitor, so they appear in your team's monthly usage total and on no individual monitor's usage figure.

Run a Guest Probe

POST/api/v1/guest/probe

Agents and CI that have no team can pay per call with x402 instead of an API key. Marketing /try stays free; this route is the paid accountless lane. An unpaid request answers HTTP 402 with a PAYMENT-REQUIRED challenge ($0.01 USDC). After settling, retry with PAYMENT-SIGNATURE. No monitor is created and Polar is not billed.

Authentication: none

Request Body

  • urlstringRequired

    Absolute URL to probe; only public http/https hosts are allowed

Errors (1)
StatusTypeMeaning
400validation-errorThe request failed validation
Response fields (200)
  • dataobjectRequired
    Show nested fields
    • probeobjectRequired
      Show nested fields
      • urlstringRequired

        The normalized absolute URL that was probed

      • statusstringRequired

        One of up, degraded, down.

      • responseTimeMsnumberRequired

        0 when the target never answered

      • responseStatusinteger | nullRequired

        Null when unreachable

      • locationstring | nullRequired

        Redirect target when redirects were not followed

      • checkedAtstringRequired

        Format: date-time.

      • paymentobjectRequired

        Settlement receipt when payment cleared

  • metaobjectRequired
    Show nested fields
    • requestIdstringRequired

      Format: uuid.

    • timestampstringRequired

      Format: date-time.

Terminal
# Unpaid → 402 with PAYMENT-REQUIRED
curl -i https://uptime.sergiodxa.com/api/v1/guest/probe \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

# After settling, retry with PAYMENT-SIGNATURE
curl https://uptime.sergiodxa.com/api/v1/guest/probe \
  -H "Content-Type: application/json" \
  -H "PAYMENT-SIGNATURE: …" \
  -d '{"url":"https://example.com"}'
Documentation