Not knowing the software that’s being used to do the updating or how it was written… it’s hard to say what the exact error is. But when accessing the API for Cloudflare the zone generally does not change (it would always be domain.com in this example) what changes is usually some field which would be the host name.
So here’s an example (for example) of a PowerShell script… which I haven’t actually used, but did a quick sanity check read through on: https://blog.netnerds.net/2015/12/use-powershell-and-cloudflare-api-v4-to-dynamically-update-cloudflare-dns-to-your-external-ip/
Update-CloudFlareDynamicDns -Token 1234567893feefc5f0q5000bfo0c38d90bbeb -Email [email protected] -Zone example.com -Record homelab
You can see this script uses both the zone name and then a record parameter to be updated. So yes… should be possible.
Above script was based on a 30 second Google search so not a recommendation just an example.