Developers
API reference
Run global reachability scans from your CI pipeline, deploy scripts or monitoring, and read the same results the dashboard shows.
Overview
The API is versioned under /v1 and speaks JSON over HTTPS. The base URL is https://networkwatchr.com. Timestamps are ISO 8601 in UTC. Scan identifiers look like scn_4cIHT9Wq0HXZYSjaLb7eoK.
Creating a scan returns immediately with an ID. Probes run in parallel and usually finish within a few seconds; poll GET /v1/scans/:id or subscribe to the live stream to see results as they arrive.
Authentication
API access is part of the Starter and Pro plans. Create a key under Dashboard → API keys. The full key is shown once; NetworkWatchr stores only a hash of it, plus a short prefix such as nw_live_3fK9pQ2a so you can recognize it later. Send it as a bearer token:
Authorization: Bearer nw_live_…Keys carry scopes. New keys get all of them unless you choose fewer:
scans:readscans:writetargets:readtargets:writeusage:readplaybooks:readplaybooks:writeplaybooks:run
Keys can be revoked at any time and can have an expiry date. They cannot manage billing or other API keys; those actions need a signed-in dashboard session. A missing, revoked or expired key returns 401 INVALID_API_KEY.
Idempotency
Send an Idempotency-Key header (up to 200 printable ASCII characters) with POST /v1/scans. If a request with the same key and the same parameters was already accepted, the API returns the original scan with 200 OK and does not use another scan from your allowance. Reusing a key with different parameters returns 409 IDEMPOTENCY_CONFLICT.
Rate limits and quotas
Every limit is enforced on the server. When one applies, the response explains which:
- API requests: 60 (Starter), 120 (Pro) or 300 (Advanced) per minute per key →
429 RATE_LIMITED - Scan starts: 10 (Starter), 30 (Pro) or 60 (Advanced) per minute per account →
429 RATE_LIMITED - Monthly scans: 50 (Starter), 250 (Pro) or 1,250 (Advanced) global scans per billing period →
429 QUOTA_EXCEEDED - Concurrent scans: 3 (Starter), 10 (Pro) or 25 (Advanced) running at once per account →
429 CONCURRENCY_LIMIT - Per target: at most 5 scans running against the same hostname across all customers →
429 TARGET_BUSY - Locations: up to 50 (Starter), 88 (Pro) or 88 (Advanced) per scan; a larger request is capped, never rejected.
One scan counts once, however many locations run it. Probe executions are metered separately for transparency in GET /v1/usage.
Scans
POST/v1/scans
Scope: scans:write
Creates a global scan and returns its ID immediately. Body fields:
url(required): a publichttp://orhttps://URL on port 80 or 443. A bare hostname is treated ashttps://. URLs with credentials, private or reserved addresses, and internal hostnames are rejected.locationSet:"global"(default; spread across continents) or"default"(the core set).locations: explicit probe IDs from the locations list; overrideslocationSet. Unavailable probes are skipped.targetId: a saved target to attach the result to.shareVisibility:"unlisted"(default; anyone with the link) or"private"(only you).
curl -X POST https://networkwatchr.com/v1/scans \
-H "Authorization: Bearer $NETWORKWATCHR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: deploy-2026-10-10-001" \
-d '{"url": "https://example.com", "locationSet": "global"}'HTTP/1.1 201 Created
{
"id": "scn_4cIHT9Wq0HXZYSjaLb7eoK",
"scanId": "scn_4cIHT9Wq0HXZYSjaLb7eoK",
"status": "queued",
"resultUrl": "/scan/scn_4cIHT9Wq0HXZYSjaLb7eoK",
"createdAt": "2026-10-10T15:17:50.610Z"
}GET/v1/scans
Scope: scans:read
Your scan history, newest first. Query parameters: limit (1–100, default 25), cursor (from nextCursor), hostname (prefix match), status, statusFamily (2xx–5xx), failedContinent (EU, NA, …), from and to (ISO timestamps).
curl "https://networkwatchr.com/v1/scans?limit=25&hostname=example.com&status=partial" \
-H "Authorization: Bearer $NETWORKWATCHR_API_KEY"{
"items": [
{
"id": "scn_4cIHT9Wq0HXZYSjaLb7eoK",
"url": "https://example.com", "hostname": "example.com",
"status": "completed", "source": "api",
"createdAt": "2026-10-10T15:17:50.610Z",
"completedAt": "2026-10-10T15:17:54.812Z",
"scheduled": 50, "reachable": 48, "healthy": 47,
"failed": 2, "probeFailures": 0, "availabilityPct": 96,
"medianTtfbMs": 229, "p95TtfbMs": 812, "durationMs": 4172,
"failedLocations": ["Mumbai", "Jakarta"]
}
],
"nextCursor": "MjAyNi0xMC0xMFQxNToxNzo1MC42MTBafDNmNGU..."
}GET/v1/scans/:id
Scope: scans:read
The full scan: status, summary, scheduled locations and per-location results. While the scan runs, unfinished locations have the state running.
Once the scan has finished, egressIps maps each location ID to the outgoing IPv4 and IPv6 address its test was seen from; the target saw the one for its IP version. Only the scan's owner gets it; an address the location could not measure is null.
{
"id": "scn_4cIHT9Wq0HXZYSjaLb7eoK",
"url": "https://example.com",
"normalizedUrl": "https://example.com/",
"hostname": "example.com",
"status": "completed",
"locationSet": "global",
"shareVisibility": "unlisted",
"source": "api",
"createdAt": "2026-10-10T15:17:50.610Z",
"startedAt": "2026-10-10T15:17:50.640Z",
"completedAt": "2026-10-10T15:17:54.812Z",
"expiresAt": "2026-11-09T15:17:50.610Z",
"isOwner": true,
"egressIps": { "frankfurt": { "ipv4": "203.0.113.10", "ipv6": "2001:db8::10" } },
"branding": false,
"summary": {
"scheduled": 50, "completed": 50, "reachable": 48, "healthy": 47,
"targetFailures": 2, "probeFailures": 0, "blocked": 0,
"availabilityPct": 96,
"medianTtfbMs": 229, "p95TtfbMs": 812,
"fastest": { "probeId": "frankfurt", "ttfbMs": 72 },
"slowest": { "probeId": "auckland", "ttfbMs": 1278 },
"statusFamilies": { "2xx": 47, "4xx": 1 },
"redirected": 0,
"durationMs": 4172
},
"locations": [
{
"id": "frankfurt", "displayName": "Frankfurt", "countryCode": "DE",
"continent": "EU", "latitude": 50.1109, "longitude": 8.6821
}
],
"results": [
{
"probeId": "frankfurt",
"state": "reachable", "networkReachable": true, "httpHealthy": true,
"failureSource": "none",
"httpStatus": 200, "dnsMs": 7, "ttfbMs": 72, "observedMs": 81,
"resolvedIpv4": ["93.184.215.14"], "resolvedIpv6": [],
"redirects": [], "finalUrl": "https://example.com/",
"headers": { "content-type": "text/html; charset=UTF-8", "server": "ECS" },
"securityHeadersRecorded": true,
"errorCode": null, "errorMessage": null,
"startedAt": "2026-10-10T15:17:50.701Z",
"completedAt": "2026-10-10T15:17:50.782Z"
}
]
}GET/v1/scans/:id/results
Scope: scans:read
Only the result parts: status, summary, locations and results. Useful for polling.
GET/v1/scans/:id/export?format=json|csv
Scope: scans:read
Downloads the result as JSON (the full scan view) or CSV (one row per location). Requires a plan with exports. CSV cells that start with =, +, - or @ are escaped so spreadsheets do not run them as formulas.
curl -OJ "https://networkwatchr.com/v1/scans/scn_4cIHT9Wq0HXZYSjaLb7eoK/export?format=csv" \
-H "Authorization: Bearer $NETWORKWATCHR_API_KEY"PATCH/v1/scans/:id
Scope: scans:write
Changes who can open the report: {"shareVisibility": "private"} or {"shareVisibility": "unlisted"}.
DELETE/v1/scans/:id
Scope: scans:write
Deletes the scan and its results permanently. Returns 204 No Content.
Live results (Server-Sent Events)
GET /v1/scans/:id/stream returns text/event-stream. Each connection starts with a full scan.snapshot, then sends probe.result events as locations answer and a final scan.completed with the summary, after which the server closes the stream. Every message is safe to apply more than once (results are keyed by probeId), so reconnecting is always safe. For a scan that has already finished, the stream sends one snapshot and ends.
curl -N https://networkwatchr.com/v1/scans/scn_4cIHT9Wq0HXZYSjaLb7eoK/stream \
-H "Authorization: Bearer $NETWORKWATCHR_API_KEY"
id: 1
data: {"type":"scan.snapshot","scanId":"scn_4cIH…","scan":{ …full scan view… }}
id: 2
data: {"type":"probe.result","scanId":"scn_4cIH…","probeId":"frankfurt","result":{ … }}
id: 51
data: {"type":"scan.completed","scanId":"scn_4cIH…","status":"completed","summary":{ … }}Result fields
NetworkWatchr separates reachability (networkReachable: an HTTP response came back, even a 404 or 500) from HTTP health (httpHealthy: the status was 2xx or 3xx). failureSource says whose problem a failure is: target, policy (our safety rules stopped it) or probe (our infrastructure failed). Probe failures never count against your site.
| state | Meaning |
|---|---|
| reachable | An HTTP response with a healthy status (2xx or 3xx). |
| http_error | The server answered, but with a 4xx or 5xx status. The network is reachable; HTTP health is not. |
| redirect_error | Too many redirects, or a redirect the probe could not follow. |
| dns_error | The hostname did not resolve from this probe (NXDOMAIN, SERVFAIL, no records, resolver timeout). |
| timeout | No response headers within 8 seconds. |
| connection_error | The connection was refused or reset. |
| tls_error | The TLS handshake or certificate validation failed. |
| blocked | The safety policy stopped the request, for example a redirect to a private address. |
| invalid_target | The URL failed the probe's own validation. |
| internal_error | NetworkWatchr's probe failed. The target was not tested from this location, and the result is excluded from availability. |
| pending, running | Only while the scan is in flight. |
Timing fields are in milliseconds and are measured inside each probe:
dnsMs: the probe's DNS-over-HTTPS lookup of your hostname.ttfbMs: request start to response headers for the final hop.observedMs: probe start until it had enough information to classify the result.
None of these is ICMP ping. Values the probes cannot measure (TCP connect, TLS handshake, download time) are null, never estimated.
Saved targets
GET/v1/targets
Scope: targets:read
Your saved targets with their latest summary: {"items": [ … ]}.
POST/v1/targets
Scope: targets:write
Saves a URL with a display name and up to 10 tags. The URL passes the same safety checks as a scan. Saving a URL you already saved returns 409 CONFLICT.
curl -X POST https://networkwatchr.com/v1/targets \
-H "Authorization: Bearer $NETWORKWATCHR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Marketing site", "url": "https://example.com", "tags": ["prod"]}'PATCH/v1/targets/:id
Scope: targets:write
Renames a target or replaces its tags: {"name": "…", "tags": ["…"]}.
DELETE/v1/targets/:id
Scope: targets:write
Deletes the target. Its past scans are kept. Returns 204 No Content.
Playbooks
A playbook is a list of steps, each a URL with checks, plus rules for what happens when a run fails. Each step runs as one global scan. Failed steps can be re-checked (optionally from every location) before a run counts as failed; a failed automated run opens an incident and notifies you, and the next passing run resolves it. Runs by hand use your scan allowance; runs from a schedule, CI or a deploy hook use the plan's automated checks (750 (Starter), 3,000 (Pro) or 9,000 (Advanced) a month), and a schedule can run as often as every hour on Starter, every 15 minutes on Pro and every 5 minutes on Advanced.
Checks (assertions) a step can have:
status: the final HTTP status is one ofexpected("200","2xx") at at leastminPctpercent of locations. A step without checks uses2xxor3xxat every location.availability: at leastminPctpercent of locations got a response.ttfb: themedian,p95ormaxtime to first byte is at mostmaxMs.final_url: redirects end where expected (equals,starts_withorhost_equals).header: a recorded response header (content-type,server,cache-control,location,via,age,x-cache,content-length, and the security headers such asstrict-transport-securityorcontent-security-policy)exists,equalsorcontainsa value.security_header: one HTTP security headercheck(hsts,content_type_options,frame_options,csp,referrer_policy,permissions_policy,version_disclosure) passes at every location that responded; withstrict: true, warnings fail it too. Locations that did not record security headers (securityHeadersRecorded: false) are left out; if none did, the step ends as NetworkWatchr's problem, not as a failure.resolves_to: every location's DNS answer includesip.
Locations where NetworkWatchr's own probe failed are left out of every check, so they never fail your playbook.
POST/v1/playbooks
Scope: playbooks:write
Creates a playbook. Every URL, including notification URLs, passes the same safety checks as a scan.
curl -X POST https://networkwatchr.com/v1/playbooks \
-H "Authorization: Bearer $NETWORKWATCHR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Shop",
"steps": [
{ "name": "Home", "url": "https://example.com",
"assertions": [{ "type": "ttfb", "stat": "p95", "maxMs": 800 }] },
{ "name": "Checkout", "url": "https://example.com/checkout",
"assertions": [{ "type": "status", "expected": ["200"], "minPct": 100 }] }
],
"schedule": { "intervalMinutes": 15, "enabled": true },
"rules": { "confirmRetries": 1, "confirmFromAllLocations": true, "remindEveryMinutes": 240 },
"notifications": { "email": true, "webhookUrl": "https://example.com/hooks/networkwatchr" }
}'GET/v1/playbooks
Scope: playbooks:read
Your playbooks with their status (unknown, passing, failing), last run and open incident. GET /v1/playbooks/:id returns one; PATCH changes any field; DELETE removes it with its runs.
POST/v1/playbooks/:id/runs
Scope: playbooks:run
Starts a run and returns 202 with a statusUrl. With an API key this is a CI run; a playbook never runs twice at once (409 CONFLICT names the running run). Poll GET /v1/playbook-runs/:runId (scope playbooks:read) until status is passed, failed or error (a NetworkWatchr problem, not your site). Each step lists its checks with what was observed.
RUN=$(curl -fsS -X POST https://networkwatchr.com/v1/playbooks/pb_…/runs \
-H "Authorization: Bearer $NETWORKWATCHR_API_KEY")
# {"runId":"pbr_…","status":"queued","statusUrl":"https://networkwatchr.com/v1/playbook-runs/pbr_…","resultUrl":"…"}
STATUS_URL=$(echo "$RUN" | jq -r .statusUrl)
until STATUS=$(curl -fsS "$STATUS_URL" -H "Authorization: Bearer $NETWORKWATCHR_API_KEY" | jq -r .status) \
&& [ "$STATUS" != queued ] && [ "$STATUS" != running ]; do sleep 5; done
[ "$STATUS" = passed ]POST/v1/hooks/playbooks/:token
Deploy hook for services that can call a URL but cannot send an API key. Create the URL in the dashboard (it is shown once); POST to it with no body. Returns the same 202 response.
GET/v1/incidents
Scope: playbooks:read
Incidents, newest first; ?status=open or resolved. Each lists its cause and every notification sent.
Webhooks
A playbook with a webhook URL receives incident.opened, incident.reminder and incident.resolved events (and test from the dashboard). Deliveries time out after 10 seconds, are not redirected, and go only to public HTTPS addresses. Verify the signature with the playbook's signing secret: it is an HMAC-SHA256 of t.body.
POST /your/endpoint
Content-Type: application/json
X-NetworkWatchr-Event: incident.opened
X-NetworkWatchr-Signature: t=1791640000,v1=5f2c…
{
"type": "incident.opened",
"incidentId": "inc_…",
"playbook": { "id": "pb_…", "name": "Shop" },
"run": { "id": "pbr_…", "status": "failed", "url": "https://networkwatchr.com/app/playbooks/pb_…?run=pbr_…" },
"cause": "Checkout: Status 200 at every location (Matched at 7 of 10 (70%); seen: 200, 503)",
"occurredAt": "2026-10-10T12:00:00.000Z"
}import { createHmac, timingSafeEqual } from "node:crypto";
export function verify(rawBody, header, secret) {
const t = /t=(\d+)/.exec(header)?.[1];
const v1 = /v1=([0-9a-f]+)/.exec(header)?.[1];
if (!t || !v1 || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
return timingSafeEqual(Buffer.from(expected), Buffer.from(v1));
}Usage
GET/v1/usage
Scope: usage:read
Your plan, the current billing period, and how much of it you have used.
{
"plan": { "id": "starter", "name": "Starter", "priceUsdMonthly": 9.99, "tagline": "…", "entitlements": { … } },
"periodStart": "2026-10-01T00:00:00.000Z",
"periodEnd": "2026-11-01T00:00:00.000Z",
"globalScansUsed": 132,
"globalScansLimit": 1000,
"dailyScansUsed": 9,
"dailyScansLimit": null,
"probeExecutionsUsed": 6600,
"apiRequestsUsed": 418,
"activeScans": 0,
"savedTargets": 4,
"automatedChecksUsed": 1210,
"automatedChecksLimit": 5000,
"playbooks": 3
}Locations
GET /v1/public/probes needs no authentication and lists the locations available for new scans: id, displayName, countryCode, continent and coordinates. Use the IDs in the locations field of POST /v1/scans.
Errors
Errors use one envelope with a stable code, a human-readable message that is safe to show to users, and a requestId to quote to support. Some errors add a details object.
HTTP/1.1 422 Unprocessable Entity
{
"error": {
"code": "BLOCKED_TARGET",
"message": "This target resolves to a private or reserved network address and cannot be tested.",
"requestId": "3f2b8c1e-9a4d-4e7b-b6c2-5d1f0a9e7c84"
}
}| Status | Code | Message |
|---|---|---|
| 402 | ENTERPRISE_REQUIRED | Traffic tests require an active Enterprise agreement. Contact sales to enable access. |
| 403 | TARGET_NOT_VERIFIED | Verify control of this website before starting a traffic test. |
| 429 | TRAFFIC_TEST_LIMIT | You have used today's traffic tests. The allowance resets at midnight UTC. |
| 400 | VALIDATION_FAILED | The request is not valid. |
| 400 | INVALID_URL | Enter a full public URL, such as https://example.com. |
| 400 | UNSUPPORTED_SCHEME | Only http:// and https:// URLs can be tested. |
| 400 | UNSUPPORTED_PORT | This URL uses a port that is not allowed. Use port 80 or 443. |
| 422 | BLOCKED_TARGET | This target resolves to a private or reserved network address and cannot be tested. |
| 422 | BLOCKED_HOSTNAME | This hostname is internal or reserved and cannot be tested. |
| 400 | HUMAN_VERIFICATION_REQUIRED | Complete the human verification and try again. |
| 403 | HUMAN_VERIFICATION_FAILED | Human verification failed. Reload the page and try again. |
| 429 | RATE_LIMITED | You are starting tests too quickly. Wait a minute and try again. |
| 429 | QUOTA_EXCEEDED | You have reached your scan allowance for this period. |
| 429 | CERTIFICATE_CHECK_LIMIT | You have used today's certificate checks. The allowance resets at midnight UTC. |
| 429 | DOMAIN_CHECK_LIMIT | You have used today's domain checks. The allowance resets at midnight UTC. |
| 429 | PORT_CHECK_LIMIT | You have used today's open port checks. The allowance resets at midnight UTC. |
| 429 | CONCURRENCY_LIMIT | Wait for your running test to finish before starting another. |
| 429 | TARGET_BUSY | Too many tests are running against this website right now. Try again in a moment. |
| 403 | TEMPORARILY_BLOCKED | Testing is temporarily blocked for this source after repeated unsafe requests. |
| 401 | UNAUTHENTICATED | Sign in to continue. |
| 401 | INVALID_API_KEY | The API key is missing, revoked, or expired. |
| 403 | FORBIDDEN | You do not have permission to do that. |
| 403 | ACCOUNT_SUSPENDED | This account is suspended. Contact support. |
| 402 | PLAN_REQUIRED | Your plan does not include this feature. |
| 404 | NOT_FOUND | Not found. |
| 409 | CONFLICT | The request conflicts with the current state. |
| 409 | IDEMPOTENCY_CONFLICT | This idempotency key was already used for a different request. |
| 409 | LIMIT_REACHED | You have reached the maximum number allowed on your plan. |
| 503 | NO_PROBES_AVAILABLE | No probe locations are available right now. This is a NetworkWatchr problem, not your website. |
| 503 | BILLING_UNAVAILABLE | Billing is not available right now. Try again later. |
| 503 | SERVICE_UNAVAILABLE | NetworkWatchr is temporarily unavailable. Try again shortly. |
| 500 | INTERNAL_ERROR | Something went wrong on our side. The request ID helps support find it. |