API deprecations·续2
Replacement: WAF Managed Rules (new version)
2025-06-15
Rate Limiting API (previous version)
Deprecation date: June 15, 2025
The Rate Limiting API is deprecated, in favor of using the Rulesets API for managing the new rate limiting rules. Refer to Rate limiting (previous version) upgrade for more information about this change.
Deprecated API:
GET /zones/:zone_id/rate_limitsPOST /zones/:zone_id/rate_limitsGET /zones/:zone_id/rate_limits/:rate_limit_idPUT /zones/:zone_id/rate_limits/:rate_limit_idDELETE /zones/:zone_id/rate_limits/:rate_limit_id
Replacement: Rate limiting rules (new version)
2025-06-08
Zone Setting: cname_flattening
Deprecation date: June 8, 2025
The Zone Settings API endpoints for managing zone-level CNAME flattening are deprecated. Instead, use the Show DNS Settings and Update DNS Settings endpoints to manage this setting.
Changes via the old endpoints will be reflected in the new ones, and vice versa, so there is no need to migrate existing zones. However, future API calls must use DNS Settings instead of the Zone Settings endpoints.
Note that, with the deprecated zone setting, values "off" and "apex" have the same behavior. These are represented as {"flatten_all_cnames": false} in the new API. The zone setting "on" corresponds to {"flatten_all_cnames": true} in the new API.
Affected APIs:
GET /zones/:zone_id/settingsPATCH /zones/:zone_id/settings
Deprecated APIs:
GET /zones/:zone_id/settings/cname_flatteningPATCH /zones/:zone_id/settings/cname_flattening
2025-03-23
Eligible Zones For Account Custom Nameservers
Deprecation date: March 23, 2025
Users can now add custom nameservers that are not part of a zone managed within their account. As a result, any zone is eligible for custom nameservers, regardless of whether it is managed by Cloudflare. Given this change, an endpoint to check for eligible zones is no longer relevant and is therefore being deprecated.
Deprecated APIs:
GET /accounts/:account_id/custom_ns/availability
2025-03-20
Cloudflare Radar: Attack top industry and vertical endpoints
Deprecation date: March 20, 2025
End of life date: September 20, 2025
The /top/industry and /top/vertical attack endpoints are now deprecated and will be replaced by the corresponding summary endpoints.
Affected APIs:
GET /radar/attacks/layer3/top/industryGET /radar/attacks/layer3/top/verticalGET /radar/attacks/layer7/top/industryGET /radar/attacks/layer7/top/vertical
Replacements:
GET /radar/attacks/layer3/summary/industryGET /radar/attacks/layer3/summary/verticalGET /radar/attacks/layer7/summary/industryGET /radar/attacks/layer7/summary/vertical
2025-03-17
Security Center: Security level and Threat Score are now automated
Change date: March 17, 2025
Cloudflare now combines the IP address threat signal with threshold and botnet data, no longer requiring you to set a sensitivity level. Users will no longer be able to set Security level via the Cloudflare dashboard. However, users can still rely on the existing API or Terraform configuration to set a Security level.
If you are using threat score in rule expressions, you should review those expressions to make sure the rule still triggers when appropriate. Cloudflare will audit and migrate your configuration in the future to update any references to threat score. If you are using the Rulesets API or Terraform to push your configuration, you should review your scripts and pipelines before the end of Q1 2026 to prevent issues.
2025-03-14
Account Settings: default_nameservers and use_account_custom_ns_by_default
Deprecation date: March 14, 2025
The fields "default_nameservers" and "use_account_custom_ns_by_default" within the "settings" object of accounts are deprecated. Instead, use the Show DNS Settings and Update DNS Settings endpoints to manage this setting. This setting is available in the new API as .zone_defaults.nameservers.type, with allowed values "cloudflare.standard", "cloudflare.standard.random", "custom.account" and "custom.tenant".
Changes via the old endpoints will be reflected in the new ones, and vice versa, so there is no need to migrate existing zones. However, future API calls must use DNS Settings instead of the Accounts endpoints.
Affected APIs:
GET /accountsPOST /accountsGET /accounts/:account_idPUT /accounts/:account_id
2025-03-11
Cloudflare Radar: Layer 7 attack magnitude parameter
Deprecation date: March 11, 2025
End of life date: June 11, 2025
The layer 7 attack magnitude query parameter, which allows you to define attack magnitude by total requests mitigated (MITIGATED_REQUESTS) or total zones attacked (AFFECTED_ZONES), is deprecated. Moving forward, Cloudflare Radar will only support defining layer 7 attack magnitude based on the total number of mitigated requests.
Affected API:
GET /radar/attacks/layer7/top/attacks
Replacement:
Users should stop using the magnitude parameter, as the default behavior already uses MITIGATED_REQUESTS.
2025-02-21
DNS Records API: Changes to Filter Parameters
Deprecation date: February 21, 2025
The following URL parameters for filtering DNS records are deprecated:
name=contains:valueInstead, use the supportedname.contains=valuesyntax.name=starts_with:valueInstead, use the supportedname.startswith=valuesyntax.name=ends_with:valueInstead, use the supportedname.endswith=valuesyntax.name=one,two,three(searching for one of multiple possible names, separated by commas) Instead, make multiple requests, one for each possiblename. Alternatively, if only querying thenamefield, the?match=any&name=one&name=two&name=threesyntax can be used instead. This syntax has an extended deprecation date of May 23, 2025.content=contains:valueInstead, use the supportedcontent.contains=valuesyntax.content=starts_with:valueInstead, use the supportedcontent.startswith=valuesyntax.content=ends_with:valueInstead, use the supportedcontent.endswith=valuesyntax.content=one,two,three(searching for one of multiple possible contents, separated by commas) Instead, make multiple requests, one for each possiblecontent. Alternatively, if only querying thecontentfield, the?match=any&content=one&content=two&content=threesyntax can be used instead. This syntax has an extended deprecation date of May 23, 2025.type=contains:valueSearching for substrings of a type name will no longer be supported. Instead, please search for an exact type name, such astype=CNAME. If the input value is a free-text search from a human user, consider using thesearchparameter instead.
None of the parameters being deprecated were ever officially supported per our API documentation.
Affected APIs:
GET /zones/:zone_id/dns_records
2024-12-09
Access applications: self_hosted_domains
Deprecation date: November 21, 2025
The self_hosted_domains field for Access applications is deprecated in favor of destinations to allow for more flexibility in defining different types of domains.
Before:
{
// ...
"self_hosted_domains": ["foo.example.com", "bar.example.com"]
}
After:
{
// ...
"destinations": [
{
"type": "public",
"uri": "foo.example.com"
},
{
"type": "public",
"uri": "bar.example.com"
}
]
}
The API will accept both fields until the deprecation date. If self_hosted_domains are provided, then they will be interpreted as public destinations. However, if destinations are provided, then self_hosted_domains will be ignored even if provided.
Additionally, the API will continue to return self_hosted_domains until the deprecation date. The field will contain the URIs of the subset of destinations that have type public.
Affected APIs:
GET /accounts/:account_id/access/appsPOST /accounts/:account_id/access/appsGET /accounts/:account_id/access/apps/:app_idPUT /accounts/:account_id/access/apps/:app_idGET /zones/:zone_id/access/appsPOST /zones/:zone_id/access/appsGET /zones/:zone_id/access/apps/:app_idPUT /zones/:zone_id/access/apps/:app_id
2024-11-30
Zone information in individual DNS records
Deprecation date: November 30, 2024
Currently, each individual DNS record returned by the API contains information about the zone it is on, specifically the zone ID and name.
{
"result": [
{
// ...
"zone_id": "ab922473c42f4e50819d7c1c9b81b16b",
"zone_name": "example.com"
}
],
// ...
}
This information is redundant because both affected API routes are already within the zone scope. In particular, the zone ID will already be known to any user of these routes because it appears in the URL. The zone name can be retrieved by making a GET request to /zones/:zone_id if it is necessary.
After November 30th, 2024, Cloudflare will stop including the zone_id and zone_name fields on individual DNS records in API responses. These fields are currently ignored when sent to the API as part of a request body, so no changes to request bodies are required.
Modified API:
GET /zones/:zone_id/dns_recordsPOST /zones/:zone_id/dns_recordsGET /zones/:zone_id/dns_records/:dns_record_idPATCH /zones/:zone_id/dns_records/:dns_record_idPUT /zones/:zone_id/dns_records/:dns_record_id
2024-10-01
DNS Records: Error chains for DNS validation errors
Deprecation date: October 1, 2024
Cloudflare is making a minor change to the representation of certain errors when creating DNS records. Currently, when the DNS record to be created is invalid, an error similar to the following may be returned:
{
"result": null,
"success": false,
"errors": [
{
"code": 1004,
"message": "DNS Validation Error",
"error_chain": [
{
"code": 9999,
"message": "This is an example."
}
]
}
],
"messages": []
}
After October 1st, 2024, the error_chain will be omitted, returning the root cause directly without wrapping it in another "DNS Validation Error" error:
{
"result": null,
"success": false,
"errors": [
{
"code": 9999,
"message": "This is an example."
}
],
"messages": []
}
2024-09-13
Legacy DNS Settings Endpoints
Deprecation date: September 13, 2024
The dedicated endpoints for DNS settings use_apex_ns and secondary_overrides are being deprecated.
Instead, use the Show DNS Settings and Update DNS Settings endpoints to manage these settings.
- Instead of the
.../use_apex_nsendpoint, use themulti_providerfield. - Instead of the
.../secondary_overridesendpoint, use thesecondary_overridesfield.
Deprecated APIs:
GET /zones/:zone_id/dns_settings/use_apex_nsPATCH /zones/:zone_id/dns_settings/use_apex_nsGET /zones/:zone_id/dns_settings/secondary_overridesPATCH /zones/:zone_id/dns_settings/secondary_overrides
2024-08-15
Brotli
Deprecation date: August 15, 2024
The Brotli setting and its API endpoints are deprecated. Brotli compression is available for all non-Enterprise zones, and it will be extended to Enterprise zones in the coming year.
Deprecated APIs:
GET /zones/:zone_id/settings/brotliPATCH /zones/:zone_id/settings/brotli
Enterprise customers can override Cloudflare's default compression behavior using Compression Rules.
2024-08-05
Auto Minify
Deprecation date: August 5, 2024
The Auto Minify API endpoints are deprecated since the Auto Minify feature was deprecated.
Deprecated APIs:
GET /zones/:zone_id/settings/minifyPATCH /zones/:zone_id/settings/minify
2024-07-14
DNS Records: 'locked' Field
Deprecation date: July 14, 2024
The "locked" field of DNS records in API responses is unused and has been guaranteed to always be false for more than a year. This deprecation means that the field will be omitted from API responses entirely. If received from a client, the field will continue to be ignored, just as it is today.
Modified API:
GET /zones/:zone_id/dns_recordsPOST /zones/:zone_id/dns_recordsGET /zones/:zone_id/dns_records/:dns_record_idPATCH /zones/:zone_id/dns_records/:dns_record_idPUT /zones/:zone_id/dns_records/:dns_record_id
2024-06-30
Mobile redirect
Deprecation date: June 30, 2024
This endpoint and its related APIs are deprecated in favor of Single Redirects. Refer to Perform mobile redirects to migrate Mobile Redirect to Redirect Rules.
