This article contains documentation for AdGuard DNS API. For the complete AdGuard DNS API changelog, visit this page.
Gets account limits
| Code | Description |
|---|
| 200 | Account limits info |
Lists dedicated IPv4 addresses
| Code | Description |
|---|
| 200 | List of dedicated IPv4 addresses |
POST
Allocates new IPv4
| Code | Description |
|---|
| 200 | New IPv4 successfully allocated |
| 429 | Dedicated IPv4 count reached the limit |
Lists devices
| Code | Description |
|---|
| 200 | List of devices |
POST
Creates a new device
| Code | Description |
|---|
| 200 | Device created |
| 400 | Validation failed |
| 429 | Devices count reached the limit |
Removes a device
| Name | Located in | Description | Required | Schema |
|---|
| device_id | path | | Yes | string |
| Code | Description |
|---|
| 200 | Device deleted |
| 404 | Device not found |
Gets an existing device by ID
| Name | Located in | Description | Required | Schema |
|---|
| device_id | path | | Yes | string |
| Code | Description |
|---|
| 200 | Device info |
| 404 | Device not found |
Updates an existing device
| Name | Located in | Description | Required | Schema |
|---|
| device_id | path | | Yes | string |
| Code | Description |
|---|
| 200 | Device updated |
| 400 | Validation failed |
| 404 | Device not found |
List dedicated IPv4 and IPv6 addresses for a device
| Name | Located in | Description | Required | Schema |
|---|
| device_id | path | | Yes | string |
| Code | Description |
|---|
| 200 | Dedicated IPv4 and IPv6 |
Unlink dedicated IPv4 from the device
| Name | Located in | Description | Required | Schema |
|---|
| device_id | path | | Yes | string |
| Code | Description |
|---|
| 200 | Dedicated IPv4 successfully unlinked from the device |
| 404 | Device or address not found |
POST
Link dedicated IPv4 to the device
| Name | Located in | Description | Required | Schema |
|---|
| device_id | path | | Yes | string |
| Code | Description |
|---|
| 200 | Dedicated IPv4 successfully linked to the device |
| 400 | Validation failed |
| 404 | Device or address not found |
| 429 | Linked dedicated IPv4 count reached the limit |
Gets DNS-over-HTTPS .mobileconfig file.
| Name | Located in | Description | Required | Schema |
|---|
| device_id | path | | Yes | string |
| exclude_wifi_networks | query | List Wi-Fi networks by their SSID in which you want AdGuard DNS to be disabled | No | [ string ] |
| exclude_domain | query | List domains that will use default DNS servers instead of AdGuard DNS | No | [ string ] |
| Code | Description |
|---|
| 200 | DNS-over-HTTPS .plist file |
| 404 | Device not found |
Generate and set new DNS-over-HTTPS password
| Name | Located in | Description | Required | Schema |
|---|
| device_id | path | | Yes | string |
| Code | Description |
|---|
| 200 | DNS-over-HTTPS password successfully reset |
| 404 | Device not found |
Gets DNS-over-TLS .mobileconfig file.
| Name | Located in | Description | Required | Schema |
|---|
| device_id | path | | Yes | string |
| exclude_wifi_networks | query | List Wi-Fi networks by their SSID in which you want AdGuard DNS to be disabled | No | [ string ] |
| exclude_domain | query | List domains that will use default DNS servers instead of AdGuard DNS | No | [ string ] |
| Code | Description |
|---|
| 200 | DNS-over-HTTPS .plist file |
| 404 | Device not found |
Updates device settings
| Name | Located in | Description | Required | Schema |
|---|
| device_id | path | | Yes | string |
| Code | Description |
|---|
| 200 | Device settings updated |
| 400 | Validation failed |
| 404 | Device not found |
Lists DNS servers that belong to the user.
Lists DNS servers that belong to the user. By default there is at least one default server.
| Code | Description |
|---|
| 200 | List of DNS servers |
POST
Creates a new DNS server
Creates a new DNS server. You can attach custom settings, otherwise DNS server will be created with default settings.
| Code | Description |
|---|
| 200 | DNS server created |
| 400 | Validation failed |
| 429 | DNS servers count reached the limit |
Removes a DNS server
Removes a DNS server. All devices attached to this DNS server will be moved to the default DNS server. Deleting the default DNS server is forbidden.
| Name | Located in | Description | Required | Schema |
|---|
| dns_server_id | path | | Yes | string |
| Code | Description |
|---|
| 200 | DNS server deleted |
| 404 | DNS server not found |
Gets an existing DNS server by ID
| Name | Located in | Description | Required | Schema |
|---|
| dns_server_id | path | | Yes | string |
| Code | Description |
|---|
| 200 | DNS server info |
| 404 | DNS server not found |
Updates an existing DNS server
| Name | Located in | Description | Required | Schema |
|---|
| dns_server_id | path | | Yes | string |
| Code | Description |
|---|
| 200 | DNS server updated |
| 400 | Validation failed |
| 404 | DNS server not found |
Updates DNS server settings
| Name | Located in | Description | Required | Schema |
|---|
| dns_server_id | path | | Yes | string |
| Code | Description |
|---|
| 200 | DNS server settings updated |
| 400 | Validation failed |
| 404 | DNS server not found |
Gets filter lists
| Code | Description |
|---|
| 200 | List of filters |
POST
Generates Access and Refresh token
| Code | Description |
|---|
| 200 | Access token issued |
| 400 | Missing required parameters |
| 401 | Invalid credentials, MFA token or refresh token provided |
null
Clears query log
| Code | Description |
|---|
| 202 | Query log was cleared |
Gets query log
| Name | Located in | Description | Required | Schema |
|---|
| time_from_millis | query | Time from in milliseconds (inclusive) | Yes | long |
| time_to_millis | query | Time to in milliseconds (inclusive) | Yes | long |
| devices | query | Filter by devices | No | [ string ] |
| countries | query | Filter by countries | No | [ string ] |
| companies | query | Filter by companies | No | [ string ] |
| statuses | query | Filter by statuses | No | [ FilteringActionStatus ] |
| categories | query | Filter by categories | No | [ CategoryType ] |
| search | query | Filter by domain name | No | string |
| limit | query | Limit the number of records to be returned | No | integer |
| cursor | query | Pagination cursor. Use cursor from response to paginate through the pages. | No | string |
| Code | Description |
|---|
| 200 | Query log |
POST
Revokes a Refresh Token
| Name | Located in | Description | Required | Schema |
|---|
| refresh_token | query | Refresh Token | Yes | string |
| Code | Description |
|---|
| 200 | Refresh token revoked |
null
Gets categories statistics
| Name | Located in | Description | Required | Schema |
|---|
| time_from_millis | query | Time from in milliseconds (inclusive) | Yes | long |
| time_to_millis | query | Time to in milliseconds (inclusive) | Yes | long |
| devices | query | Filter by devices | No | [ string ] |
| countries | query | Filter by countries | No | [ string ] |
| Code | Description |
|---|
| 200 | Categories statistics received |
| 400 | Validation failed |
Gets companies statistics
| Name | Located in | Description | Required | Schema |
|---|
| time_from_millis | query | Time from in milliseconds (inclusive) | Yes | long |
| time_to_millis | query | Time to in milliseconds (inclusive) | Yes | long |
| devices | query | Filter by devices | No | [ string ] |
| countries | query | Filter by countries | No | [ string ] |
| Code | Description |
|---|
| 200 | Companies statistics received |
| 400 | Validation failed |
Gets detailed companies statistics
| Name | Located in | Description | Required | Schema |
|---|
| time_from_millis | query | Time from in milliseconds (inclusive) | Yes | long |
| time_to_millis | query | Time to in milliseconds (inclusive) | Yes | long |
| devices | query | Filter by devices | No | [ string ] |
| countries | query | Filter by countries | No | [ string ] |
| cursor | query | Pagination cursor | No | string |
| Code | Description |
|---|
| 200 | Detailed companies statistics received |
| 400 | Validation failed |
Gets countries statistics
| Name | Located in | Description | Required | Schema |
|---|
| time_from_millis | query | Time from in milliseconds (inclusive) | Yes | long |
| time_to_millis | query | Time to in milliseconds (inclusive) | Yes | long |
| devices | query | Filter by devices | No | [ string ] |
| countries | query | Filter by countries | No | [ string ] |
| Code | Description |
|---|
| 200 | Countries statistics received |
| 400 | Validation failed |
Gets devices statistics
| Name | Located in | Description | Required | Schema |
|---|
| time_from_millis | query | Time from in milliseconds (inclusive) | Yes | long |
| time_to_millis | query | Time to in milliseconds (inclusive) | Yes | long |
| devices | query | Filter by devices | No | [ string ] |
| countries | query | Filter by countries | No | [ string ] |
| Code | Description |
|---|
| 200 | Devices statistics received |
| 400 | Validation failed |
/oapi/v1/stats/domains
Gets domains statistics
| Name | Located in | Description | Required | Schema |
|---|
| time_from_millis | query | Time from in milliseconds (inclusive) | Yes | long |
| time_to_millis | query | Time to in milliseconds (inclusive) | Yes | long |
| devices | query | Filter by devices | No | [ string ] |
| countries | query | Filter by countries | No | [ string ] |
| Code | Description |
|---|
| 200 | Domains statistics received |
| 400 | Validation failed |
Gets time statistics
| Name | Located in | Description | Required | Schema |
|---|
| time_from_millis | query | Time from in milliseconds (inclusive) | Yes | long |
| time_to_millis | query | Time to in milliseconds (inclusive) | Yes | long |
| devices | query | Filter by devices | No | [ string ] |
| countries | query | Filter by countries | No | [ string ] |
| Code | Description |
|---|
| 200 | Time statistics received |
| 400 | Validation failed |
Lists web services
| Code | Description |
|---|
| 200 | List of web-services |