DNS Records Type query not working

For Workes & Pages, what is the name of the domain?

What is the issue or error you’re encountering

type query for dnsrecords does not work

What are the steps to reproduce the issue?

I am working with the API to retrieve DNS records, the URI i am using is:

/zones/$ZoneID/dns_records?type=$recordtype&name=$recordname&match=all

Assume the variables are correctly populated, the recordtype is not being hnored and returns all types that match that name. Are name and type mutually exclusive?

Have you tried without the variable first ? From the test the record type is honor.

curl "https://api.cloudflare.com/client/v4/zones/--Redact--/dns_records?type=A&name=spf_record_in_txt.Redact.xyz&match=all" -H "X-Auth-Key: --Redact--" -H "X-Auth-Email: --Redact--" | jq | grep -i type
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   562    0   562    0     0    601      0 --:--:-- --:--:-- --:--:--   601
      "type": "A",

curl "https://api.cloudflare.com/client/v4/zones/--Redact--/dns_records?name=spf_record_in_txt.Redact.xyz&match=all" -H "X-Auth-Key: --Redact--" -H "X-Auth-Email: --Redact--" | jq | grep -i type
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1068    0  1068    0     0   1098      0 --:--:-- --:--:-- --:--:--  1098
      "type": "A",
      "type": "TXT",

If not honor then you need to check your variable.