Control D DNS Management
Control D is a DNS filtering and privacy service. This skill enables full API access.
Authentication
Store API token in environment variable or pass directly:
CODEBLOCK0
Get your API token from: https://controld.com/dashboard (Account Settings > API)
Token Types:
- - Read - View-only access to Profiles, Devices, and Analytics
- Write - View and modify data (create/modify/delete)
Security Tip: Restrict tokens by allowed IP addresses for automation hosts.
API Reference
Base URL: https://api.controld.com
Auth: INLINECODE1
Profiles
DNS filtering profiles define blocking rules, filters, and service controls.
CODEBLOCK1
Profile Options
CODEBLOCK2
Devices
Devices are DNS endpoints that use profiles for filtering.
CODEBLOCK3
Device Icons: desktop-windows, desktop-mac, desktop-linux, mobile-ios, mobile-android, browser-chrome, browser-firefox, browser-edge, browser-brave, browser-other, tv-apple, tv-android, tv-firetv, tv-samsung, tv, router-asus, router-ddwrt, router-firewalla, router-freshtomato, router-glinet, router-openwrt, router-opnsense, router-pfsense, router-synology, router-ubiquiti, router-windows, router-linux, INLINECODE29
Device Status: 0=pending, 1=active, 2=soft-disabled, 3=hard-disabled
Filters
Native and external blocking filters for profiles.
CODEBLOCK4
Services
Block, bypass, or redirect specific services (apps/websites).
CODEBLOCK5
Custom Rules
Create custom blocking/bypass rules for specific domains.
CODEBLOCK6
Rule Actions (do): 0=block, 1=bypass, 2=spoof (resolve via proxy), 3=redirect
Default Rule
Set default action for unmatched domains.
CODEBLOCK7
Proxies
List available proxy locations for traffic redirection (spoofing).
CODEBLOCK8
Use proxy PK values with the via parameter when setting service/rule actions to do:2 (spoof).
IP Access Control
Manage known/allowed IPs for devices.
CODEBLOCK9
Analytics
Configure logging and storage settings.
CODEBLOCK10
Account & Network
CODEBLOCK11
Organization Management (Business Accounts)
Organization features require a business account. These endpoints manage multi-user access, sub-organizations, and team deployments.
Note: Contact [[email protected]](mailto:[email protected]) from a work email to request business account access.
Organization capabilities include:
- - Manage large amounts of end user devices or networks
- Quickly onboard hundreds/thousands of devices using RMM
- Grant access to team members with permission levels
- Group Profiles and Endpoints into Sub-Organizations
- Share Profiles between organizations
- Lock resolvers to specific IP addresses
Organizations
The organization endpoints operate on the organization associated with your API token (no org_id in path).
CODEBLOCK12
Modify Organization Parameters (all optional):
- -
name (string) — Organization name - INLINECODE41 (string) — Primary contact email
- INLINECODE42 (integer) — Require 2FA/MFA for members (0=no, 1=yes)
- INLINECODE43 (string) — Storage region PK from INLINECODE44
- INLINECODE45 (integer) — Max number of User Devices
- INLINECODE46 (integer) — Max number of Router Devices
- INLINECODE47 (string) — Physical address
- INLINECODE48 (string) — Website URL
- INLINECODE49 (string) — Contact person name
- INLINECODE50 (string) — Phone number
- INLINECODE51 (string) — Global Profile ID to enforce on all devices
Note: Modifying max_users and max_routers is a billable event.
Members
View organization membership.
CODEBLOCK13
Sub-Organizations
Sub-organizations compartmentalize profiles and endpoints into logical groups:
- - Departments - Internal organizational units
- Physical sites - Office locations, branches
- Customer companies - For MSPs managing multiple clients
- Any logical grouping - Based on your needs
Each sub-org has its own Profiles, Endpoints, and optionally a Global Profile that applies to all its Endpoints.
CODEBLOCK14
Create Sub-Organization Parameters:
Required:
- -
name (string) — Organization name - INLINECODE55 (string) — Primary contact email
- INLINECODE56 (integer) — Require 2FA/MFA (0=no, 1=yes)
- INLINECODE57 (string) — Storage region PK from INLINECODE58
- INLINECODE59 (integer) — Max number of User Devices
- INLINECODE60 (integer) — Max number of Router Devices
Optional:
- -
address (string) — Physical address - INLINECODE62 (string) — Website URL
- INLINECODE63 (string) — Contact person name
- INLINECODE64 (string) — Phone number
- INLINECODE65 (string) — Global Profile ID to enforce on all devices
Provisioning Codes
Mass deploy ctrld daemon to endpoints using RMM tools.
CODEBLOCK15
Device Types: windows, mac, INLINECODE68
Deployment Commands:
# Windows (PowerShell as Admin)
(Invoke-WebRequest -Uri 'https://api.controld.com/dl/rmm' -UseBasicParsing).Content | Set-Content "$env:TEMP\ctrld_install.ps1"; Invoke-Expression "& '$env:TEMP\ctrld_install.ps1' 'CODE'"
# macOS/Linux
sh -c 'sh -c "$(curl -sSL https://api.controld.com/dl/rmm)" -s CODE'
Billing
View billing history, subscriptions, and active products.
CODEBLOCK17
Mobile Config (Apple Devices)
Generate signed Apple DNS profiles (.mobileconfig) for iOS/macOS devices.
CODEBLOCK18
Path Parameter:
- -
device_id (required) — Device/Resolver ID
Query Parameters (all optional):
- -
exclude_wifi[] (array) — WiFi SSIDs to exclude from using Control D - INLINECODE71 (array) — Domain names to exclude from using Control D
- INLINECODE72 (string) — Set to
1 to return unsigned profile - INLINECODE74 (string) — Set to
1 to exclude common captive portal hostnames from WiFi exclusions - INLINECODE76 (string) — Optional client name
Note: This endpoint returns binary data (not JSON) on success. Errors still return JSON.
Helper Script
Use scripts/controld.sh for common operations:
CODEBLOCK19
Common Workflows
Set Up New Device
- 1. List profiles: INLINECODE78
- Create or select profile
- Create device with profile: INLINECODE79
- Note the resolver addresses (DoH/DoT/IPv4) from response
- Configure device DNS to use resolvers
Block Social Media
- 1. List social media services: INLINECODE80
- Block each service: INLINECODE81
- Or create custom rules for specific domains
Enable Ad Blocking
- 1. List filters: INLINECODE82
- Enable ad-related filters: INLINECODE83
- Enable malware filters: INLINECODE84
Redirect Traffic Through Proxy (Geo-Spoofing)
- 1. List proxies: INLINECODE85
- Set service to spoof via proxy:
CODEBLOCK20
Mass Deploy to Enterprise Endpoints
- 1. Create provisioning code: INLINECODE86
- Deploy via RMM using the provided command
- Monitor endpoint registrations in dashboard
Rate Limiting
API rate limit: ~1200 requests per 5 minutes (4 req/sec average). Exponential backoff on 429 responses.
Notes
- - Organization endpoints require a business account
- Sub-organization members inherit parent org member permissions unless explicitly added
- Global Profile on a sub-org applies to ALL devices in that sub-org
- Analytics data is stored for 1 month (raw logs) or 1 year (stats)
- SSO supported: Okta OIDC and Microsoft EntraID OIDC
API Documentation Sources
- - Conceptual docs: https://docs.controld.com/docs/
- API reference: https://docs.controld.com/reference/get-started (JS-rendered)
- API base URL: https://api.controld.com
Verified endpoints (from API reference, March 2026):
- - Core:
/profiles, /devices, /access, /proxies, /services, INLINECODE92 - Organization:
/organizations/organization, /organizations/members, /organizations/sub_organizations, /organizations/suborg, /organizations (PUT) - Billing:
/billing/payments, /billing/subscriptions, INLINECODE100 - Mobile Config: INLINECODE101
- Provisioning: INLINECODE102
Organization and billing endpoints require a business account.
Control D DNS 管理
Control D 是一项 DNS 过滤和隐私服务。此技能支持完整的 API 访问。
身份验证
将 API 令牌存储在环境变量中或直接传递:
bash
export CONTROLDAPITOKEN=your-api-token
从以下地址获取您的 API 令牌:https://controld.com/dashboard (账户设置 > API)
令牌类型:
- - 读取 - 仅查看配置文件、设备和分析的权限
- 写入 - 查看和修改数据(创建/修改/删除)
安全提示: 通过允许的 IP 地址限制自动化主机的令牌。
API 参考
基础 URL:https://api.controld.com
认证:Authorization: Bearer $CONTROLDAPITOKEN
配置文件
DNS 过滤配置文件定义了阻止规则、过滤器和服务控制。
bash
列出所有配置文件
curl -s -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/profiles | jq .body.profiles
创建配置文件
curl -s -X POST -H Authorization: Bearer $CONTROLD
APITOKEN \
-H Content-Type: application/json \
-d {name:我的配置文件} \
https://api.controld.com/profiles
克隆现有配置文件
curl -s -X POST -H Authorization: Bearer $CONTROLD
APITOKEN \
-H Content-Type: application/json \
-d {name:克隆的配置文件,clone
profileid:PROFILE_ID} \
https://api.controld.com/profiles
更新配置文件
curl -s -X PUT -H Authorization: Bearer $CONTROLD
APITOKEN \
-H Content-Type: application/json \
-d {name:新名称} \
https://api.controld.com/profiles/PROFILE_ID
删除配置文件
curl -s -X DELETE -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/profiles/PROFILE_ID
配置文件选项
bash
列出可用的配置文件选项
curl -s -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/profiles/options | jq .body.options
更新配置文件选项(状态:1=启用,0=禁用)
curl -s -X PUT -H Authorization: Bearer $CONTROLD
APITOKEN \
-H Content-Type: application/json \
-d {status:1,value:some_value} \
https://api.controld.com/profiles/PROFILE
ID/options/OPTIONNAME
设备
设备是使用配置文件进行过滤的 DNS 端点。
bash
列出所有设备
curl -s -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/devices | jq .body.devices
列出设备类型(图标)
curl -s -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/devices/types | jq .body.types
创建设备
curl -s -X POST -H Authorization: Bearer $CONTROLD
APITOKEN \
-H Content-Type: application/json \
-d {name:家庭路由器,profile
id:PROFILEID,icon:router} \
https://api.controld.com/devices
更新设备
curl -s -X PUT -H Authorization: Bearer $CONTROLD
APITOKEN \
-H Content-Type: application/json \
-d {name:新名称,status:1} \
https://api.controld.com/devices/DEVICE_ID
删除设备
curl -s -X DELETE -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/devices/DEVICE_ID
设备图标: desktop-windows、desktop-mac、desktop-linux、mobile-ios、mobile-android、browser-chrome、browser-firefox、browser-edge、browser-brave、browser-other、tv-apple、tv-android、tv-firetv、tv-samsung、tv、router-asus、router-ddwrt、router-firewalla、router-freshtomato、router-glinet、router-openwrt、router-opnsense、router-pfsense、router-synology、router-ubiquiti、router-windows、router-linux、router
设备状态: 0=待处理,1=活跃,2=软禁用,3=硬禁用
过滤器
配置文件的本地和外部阻止过滤器。
bash
列出配置文件的本地过滤器
curl -s -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/profiles/PROFILE_ID/filters | jq .body.filters
列出外部过滤器
curl -s -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/profiles/PROFILE_ID/filters/external | jq .body.filters
启用/禁用过滤器(状态:1=启用,0=禁用)
curl -s -X PUT -H Authorization: Bearer $CONTROLD
APITOKEN \
-H Content-Type: application/json \
-d {status:1} \
https://api.controld.com/profiles/PROFILE
ID/filters/filter/FILTERID
服务
阻止、绕过或重定向特定服务(应用/网站)。
bash
列出服务类别
curl -s -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/services/categories | jq .body.categories
列出类别中的服务
curl -s -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/services/categories/CATEGORY | jq .body.services
列出配置文件服务及其操作
curl -s -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/profiles/PROFILE_ID/services | jq .body.services
设置服务操作(do:0=阻止,1=绕过,2=欺骗)
curl -s -X PUT -H Authorization: Bearer $CONTROLD
APITOKEN \
-H Content-Type: application/json \
-d {do:0,status:1} \
https://api.controld.com/profiles/PROFILE
ID/services/SERVICEID
自定义规则
为特定域名创建自定义阻止/绕过规则。
bash
列出规则文件夹
curl -s -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/profiles/PROFILE_ID/groups | jq .body.groups
创建规则文件夹
curl -s -X POST -H Authorization: Bearer $CONTROLD
APITOKEN \
-H Content-Type: application/json \
-d {name:我的规则,do:0} \
https://api.controld.com/profiles/PROFILE_ID/groups
更新规则文件夹
curl -s -X PUT -H Authorization: Bearer $CONTROLD
APITOKEN \
-H Content-Type: application/json \
-d {do:0,status:1} \
https://api.controld.com/profiles/PROFILE
ID/groups/FOLDERID
删除规则文件夹
curl -s -X DELETE -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/profiles/PROFILE
ID/groups/FOLDERID
列出文件夹中的规则
curl -s -H Authorization: Bearer $CONTROLD
APITOKEN \
https://api.controld.com/profiles/PROFILE
ID/rules/FOLDERID | jq .body.rules
创建自定义规则(do:0=阻止,1=绕过,2=欺骗,3=重定向)
curl -s -X POST -H Authorization: Bearer $CONTROLD
APITOKEN \
-H Content-Type: application/json \
-d {hostnames:[ads.example.com,tracking.example.com],do:0,status:1} \
https://api.controld.com/profiles/PROFILE_ID/rules
删除自定义