Turning on off proxy thru the API

Hi All, nice to be in this community !!
I have 2 questions:
Straight to the point:

1-
I need to set proxy “off” for a recenty created “A Record” for a domain , issue some commands and then set it to “on” , all programatically done thru the API.
Now, when I first create the “A” record with the proyx off this way. all goes ok as expected:
curl -X POST … --data '{“type”:“A”,“name”:“domain1”, “content”:“nnn.nnn.nnn.nnn”,“ttl”:120,“priority”:10,“proxied”:false}
Record is created ok

After a few lines I need to set it to “true” so I issue:
curl -X PUT … --data '{“type”:“A”,“name”:“domain1”, “content”:“nnn.nnn.nnn.nnn”,“ttl”:120,“priority”:10,“proxied”:true}
what is giving us: “code”: 1001
“error”: “method_not_allowed”
although this request is valid as I can see in the API documentation:
https://api.cloudflare.com/#dns-records-for-a-zone-update-dns-record

what I’m doing wrong?

Can someone please share the same request to we can see whats wrong with it?
Same structure and format is used to create the “A” record with proxy to “false” without any problem at all…
Thanks in Advance,
Robert

A post was merged into an existing topic: Turning on/off proxy for a domain thru the API