Not able to update dns record

I tried to use the api from document
curl -X PUT “https://api.cloudflare.com/client/v4/zones/$zone_id/dns_records/$userid
-H “Authorization: Bearer VC_Eyv…xxx…”
-H “Content-Type: application/json”
–data ‘{“type”:“A”,“name”:“abc.example.com”,“content”:“127.0.0.1”,“ttl”:{},“proxied”:false}’

But will get “code”: 81044, “message”: “Record does not exist.”

I am pretty sure it not relevant to authentication because I can create dns record by calling post verb.

Any idea to do debug?

Your $userid should be the DNS record ID. You can get it from a Listing:
https://api.cloudflare.com/#dns-records-for-a-zone-list-dns-records

works like charm, i used the wrong id.
Thanks!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.