Advanced DNS Protection

Last updated Apr 15, 2026 Use the Cloudflare API to configure Advanced DNS Protection via API.

For examples of API calls, refer to Common API calls.

Endpoints

To obtain the complete endpoint, append the Advanced DNS Protection API endpoints listed below to the Cloudflare API base URL:

https://api.cloudflare.com/client/v4

The {account_id} argument is the account ID (a hexadecimal string). You can find this value in the Cloudflare dashboard.

The following table summarizes the available operations.

Operation Verb + Endpoint
List DNS protection rules GET accounts/{account_id}/magic/advanced_dns_protection/configs/dns_protection/rules Fetches all DNS protection rules in the account.
Add a DNS protection rule POST accounts/{account_id}/magic/advanced_dns_protection/configs/dns_protection/rules Adds a DNS protection rule to the account.
Get a DNS protection rule GET accounts/{account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/{rule_id} Fetches the details of an existing DNS protection rule in the account.
Update a DNS protection rule PATCH accounts/{account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/{rule_id} Updates an existing DNS protection rule in the account.
Delete a DNS protection rule DELETE accounts/{account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/{rule_id} Deletes an existing DNS protection rule from the account.
Delete all DNS protection rules DELETE accounts/{account_id}/magic/advanced_dns_protection/configs/dns_protection/rules Deletes all existing DNS protection rules from the account.

Was this helpful?

YesNo

On this page

Advanced DNS Protection - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ddos-protection/advanced-ddos-systems/api/dns-protection/#page","headline":"Advanced DNS Protection","description":"Configure Advanced DNS Protection rules and settings using the Cloudflare API.","url":"https://developers.cloudflare.com/ddos-protection/advanced-ddos-systems/api/dns-protection/","inLanguage":"en","image":"https://developers.cloudflare.com/ddos-protection/advanced-ddos-systems/api/dns-protection/og.png?v=0247d6aae0ecdb7a","dateModified":"2026-04-15","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Example API requests for managing Advanced DNS Protection rules and settings. title: Common API calls image: https://developers.cloudflare.com/ddos-protection/advanced-ddos-systems/api/dns-protection/examples/og.png?v=ed25b9329656ba65


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/ddos-protection/llms.txt
Use this file to discover all available pages before exploring further.