API Documentation

Programmatic access to your DNS filtering platform via REST API.

⬇ Download OpenAPI spec (YAML) Import into Postman, Swagger UI, or use to generate SDK clients

Authentication

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
Your API key provides the same access level as your account. Keep it secret. If compromised, regenerate it immediately from the Account page.

Endpoints Reference

Client Management

MethodEndpointDescription
GET/api/admin/usersList all clients
POST/api/admin/usersCreate a new client account
PUT/api/admin/users/:user_id/planChange a client's plan
DELETE/api/admin/users/:user_idDelete a client account

Client Profiles

MethodEndpointDescription
GET/api/admin/users/:user_id/profilesList a client's profiles
GET/api/admin/users/:user_id/profiles/:config_idGet a client's profile details
PUT/api/admin/users/:user_id/profiles/:config_idUpdate a client's profile settings
DELETE/api/admin/users/:user_id/profiles/:config_idDelete a client's profile

Client Analytics

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
MethodEndpointDescription
GET/api/analytics/:config_id/stats?period=24hStats overview (24h, 7d, 30d)
GET/api/analytics/:config_id/queries?limit=50Query log (recent DNS queries)
GET/api/analytics/:config_id/top-domains?limit=100Top domains, blocked domains, devices
GET/api/analytics/:config_id/destinations?period=24hTraffic destinations by country

System

MethodEndpointDescription
GET/api/admin/stats?period=24hGlobal stats (all clients)
GET/api/admin/node-stats?period=24hPer-node stats
GET/api/admin/healthSystem health checks
Partners use the same endpoints under /api/partner/ instead of /api/admin/.

Profile Settings

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
}

Examples

Get account info

curl -s -H "X-API-Key: YOUR_API_KEY" \
  https://YOUR_DOMAIN/api/me | jq

List profiles

curl -s -H "X-API-Key: YOUR_API_KEY" \
  https://YOUR_DOMAIN/api/profiles | jq

Get stats (24h)

curl -s -H "X-API-Key: YOUR_API_KEY" \
  https://YOUR_DOMAIN/api/analytics/CONFIG_ID/stats?period=24h

Add a domain to the denylist

# 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

Create a user account (Admin)

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

List all users (Admin)

curl -s -H "X-API-Key: YOUR_API_KEY" \
  https://YOUR_DOMAIN/api/admin/users | jq

System health check

curl -s -H "X-API-Key: YOUR_API_KEY" \
  https://YOUR_DOMAIN/api/admin/health | jq

Manage a client's profile

# 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

Errors

All errors return a JSON object with an error field:

{ "error": "invalid API key" }
HTTP CodeMeaning
401Missing or invalid API key
403Insufficient permissions (not admin/partner)
404Resource not found
500Internal server error