REST API
Everything you can do in the dashboard, you can do over HTTP — create monitors, run tests, and read incidents. The API lives under /api/v1 and authenticates with an API key.
On this page
Authentication
Send your key in the X-API-Key header. Endpoints that act on a specific project also need an X-Project-Id header so the request is scoped correctly. Keys look like uk42_… — the prefix identifies the key, the rest is the secret.
curl https://app.tunnelhq.com/api/v1/servers \
-H "X-API-Key: $TUNNELHQ_API_KEY" \
-H "X-Project-Id: 42"Create a key
Generate keys under Developers → API Keys. Keys are scoped to the organization they're created in, and that org's plan governs them.
API access is a paid feature
Treat keys like passwords
Example requests
Monitors are exposed as the /servers resource, with prefixed IDs like srv_916. List the monitors in a project:
curl https://app.tunnelhq.com/api/v1/servers \
-H "X-API-Key: $TUNNELHQ_API_KEY" \
-H "X-Project-Id: 42"Create a monitor. Config-file protocols like WireGuard take the full config in a config field — the endpoint host and port are read from it:
curl -X POST https://app.tunnelhq.com/api/v1/servers \
-H "X-API-Key: $TUNNELHQ_API_KEY" \
-H "X-Project-Id: 42" \
-H "Content-Type: application/json" \
-d '{
"name": "Helsinki-I",
"protocol": "wireguard",
"config": "[Interface]\nPrivateKey = ...\nAddress = 10.0.0.2/32\n\n[Peer]\nPublicKey = ...\nEndpoint = vpn.example.com:51820\nAllowedIPs = 0.0.0.0/0"
}'Run an on-demand connectivity test against an existing monitor:
curl -X POST https://app.tunnelhq.com/api/v1/servers/srv_916/test \
-H "X-API-Key: $TUNNELHQ_API_KEY" \
-H "X-Project-Id: 42"What's available
- Monitors —
GET/POST /servers,GET/PUT/DELETE /servers/:id, plus/servers/searchacross projects. - Tests — on-demand
POST /servers/:id/test, batch tests, and a publicPOST /checkfor one-off config checks. - Results — recent check results, failures, and per-server history.
- Incidents — list, acknowledge, and retest.
- Subscriptions — manage subscription URLs and trigger syncs.
- Discovery & usage —
/whoami,/organizations,/projects,/usage, and key management under/keys.
Rate limits & usage
Requests are rate-limited per organization according to your plan, with per-minute, per-day, and per-month windows. Each response carries the per-minute state in X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers so you can back off before you hit it, and the API Keys page shows usage per key and across the org.
Full endpoint reference