hello, I have a problem adding DNS through API, hope you can help me
curl --location 'https://api.cloudflare.com/client/v4/zones/<Account ID>/dns_records' \
--header 'X-Auth-Key: <Global API Key>' \
--header 'X-Auth-Email: [email protected]' \
--header 'Content-Type: application/json' \
"comment": "Domain verification record",
Hi! In the URL, where it says
<Account ID>, that needs to be your zone ID, not your account ID.
Excuse me, how do I get ZONE ID
You can find that in the bottom right corner of the Cloudflare dashboard after navigating to your zone’s “Overview” tab. Alternatively, you can make a GET request to
https://api.cloudflare.com/client/v4/zones which will return information about all your zones (since you’re using a Global API Key, which has access to your entire account).
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.