Unable to update IP Address of DNS Location in Zero Trust using API in free plan

Additional information

I don’t know/other

What is the error number?

1212

What is the error message?

Invalid CIDR

What is the issue you’re encountering

Unable to update IP Address of DNS Location in Zero Trust using API. Here is how to navigate → Zero Trust → Gateway → DNS Location → Endpoint Protection ->IPv4 addresses

What steps have you taken to resolve the issue?

I have tried to give more permissions to the API Token and also used the Global API Key. None of the method helps.

What are the steps to reproduce the issue?

Execute below API

Code 01:
curl -X PUT “https://api.cloudflare.com/client/v4/accounts//gateway/locations/” -H “Authorization: Bearer ” -H “Content-Type: application/json” --data ‘{“name”:“Home”,“networks”:[“106.51.217.45/32”],“client_default”:“true”}’

Code-02
curl -X PUT “https://api.cloudflare.com/client/v4/accounts//gateway/locations/” -H “X-Auth-Email: ” -H “X-Auth-Key: ” -H “Content-Type: application/json” --data ‘{“name”:“Home”,“networks”:[“106.51.217.45”],“client_default”:“true”}’

Screenshot of the error

106.51.217.45/32 = 106.51.217.45 which is probably why its seen as invalid

I think this is on purpose not possible. I the UI you are not allow to set that IP-Adresse manualy, it will always take your current IP Adresse you are logged in (that makes absolutly no sense, but it is what it is). They might have limited this also via API.