Programmatic access to your DNS filtering platform via REST API.
All API requests require an API Key in the X-API-Key header. Generate your key in the Account page.
# Include your API key in every request curl -H "X-API-Key: YOUR_API_KEY" https://YOUR_DOMAIN/api/me
| Method | Endpoint | Description | |
|---|---|---|---|
| GET | /api/admin/users | List all clients | |
| POST | /api/admin/users | Create a new client account | |
| PUT | /api/admin/users/:user_id/plan | Change a client's plan | |
| DELETE | /api/admin/users/:user_id | Delete a client account |
| Method | Endpoint | Description | |
|---|---|---|---|
| GET | /api/admin/users/:user_id/profiles | List a client's profiles | |
| GET | /api/admin/users/:user_id/profiles/:config_id | Get a client's profile details | |
| PUT | /api/admin/users/:user_id/profiles/:config_id | Update a client's profile settings | |
| DELETE | /api/admin/users/:user_id/profiles/:config_id | Delete a client's profile |
Each profile has a config_id (found in the response of GET /api/admin/users/:user_id/profiles). Use it to query a client's DNS analytics:
# 1. List the client's profiles to find the config_id curl -s -H "X-API-Key: YOUR_API_KEY" \ https://YOUR_DOMAIN/api/admin/users/USER_ID/profiles # Each profile has a "configId" field (e.g. "a1b2c3d4e5f6") # 2. Use the config_id to query analytics curl -s -H "X-API-Key: YOUR_API_KEY" \ https://YOUR_DOMAIN/api/analytics/a1b2c3d4e5f6/stats?period=24h
| Method | Endpoint | Description | |
|---|---|---|---|
| GET | /api/analytics/:config_id/stats?period=24h | Stats overview (24h, 7d, 30d) | |
| GET | /api/analytics/:config_id/queries?limit=50 | Query log (recent DNS queries) | |
| GET | /api/analytics/:config_id/top-domains?limit=100 | Top domains, blocked domains, devices | |
| GET | /api/analytics/:config_id/destinations?period=24h | Traffic destinations by country |
| Method | Endpoint | Description | |
|---|---|---|---|
| GET | /api/admin/stats?period=24h | Global stats (all clients) | |
| GET | /api/admin/node-stats?period=24h | Per-node stats | |
| GET | /api/admin/health | System health checks |
/api/partner/ instead of /api/admin/.When updating a client's profile (PUT /api/admin/users/:user_id/profiles/:config_id), you can set any of these fields:
{
"name": "My Profile",
"dns_preset": "security", // "no_filtering", "security", "family"
"whitelist": ["allowed.com"],
"blacklist": ["blocked.com", "*.ads.com"],
"linked_ips": ["203.0.113.1"],
"safe_search": true,
"block_canary": true,
"block_telemetry": true,
"safe_browsing": true,
"block_rebinding": true,
"blocked_services": ["facebook", "tiktok"],
"blocked_services_enabled": true,
"allowlist_enabled": true,
"denylist_enabled": true
}
curl -s -H "X-API-Key: YOUR_API_KEY" \
https://YOUR_DOMAIN/api/me | jq
curl -s -H "X-API-Key: YOUR_API_KEY" \
https://YOUR_DOMAIN/api/profiles | jq
curl -s -H "X-API-Key: YOUR_API_KEY" \
https://YOUR_DOMAIN/api/analytics/CONFIG_ID/stats?period=24h
# Get current blacklist, add domain, update curl -s -X PUT -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"blacklist": ["existing.com", "newdomain.com"]}' \ https://YOUR_DOMAIN/api/admin/users/USER_ID/profiles/CONFIG_ID
curl -s -X POST -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"email":"user@example.com", "password":"SecurePass123", "name":"John Doe", "notify":true}' \ https://YOUR_DOMAIN/api/admin/users
curl -s -H "X-API-Key: YOUR_API_KEY" \
https://YOUR_DOMAIN/api/admin/users | jq
curl -s -H "X-API-Key: YOUR_API_KEY" \
https://YOUR_DOMAIN/api/admin/health | jq
# 1. List all clients curl -s -H "X-API-Key: YOUR_API_KEY" \ https://YOUR_DOMAIN/api/admin/users | jq # 2. List a specific client's profiles (use user_id from step 1) curl -s -H "X-API-Key: YOUR_API_KEY" \ https://YOUR_DOMAIN/api/admin/users/USER_ID/profiles | jq # 3. View the client's profile details curl -s -H "X-API-Key: YOUR_API_KEY" \ https://YOUR_DOMAIN/api/admin/users/USER_ID/profiles/CONFIG_ID | jq # 4. Update the client's profile (enable Safe Search + block TikTok) curl -s -X PUT -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"safe_search": true, "blocked_services": ["tiktok"], "blocked_services_enabled": true}' \ https://YOUR_DOMAIN/api/admin/users/USER_ID/profiles/CONFIG_ID
All errors return a JSON object with an error field:
{ "error": "invalid API key" }
| HTTP Code | Meaning |
|---|---|
401 | Missing or invalid API key |
403 | Insufficient permissions (not admin/partner) |
404 | Resource not found |
500 | Internal server error |