Created DNS but Authentication error (code:10000)

hello, I have a problem adding DNS through API, hope you can help me

curl --location '<Account ID>/dns_records' \
--header 'X-Auth-Key: <Global API Key>' \
--header 'X-Auth-Email: [email protected]' \
--header 'Content-Type: application/json' \
--data '{
  "content": "",
  "name": "",
  "proxied": true,
  "type": "A",
  "comment": "Domain verification record",
  "tags": [
  "ttl": 3600

Hi! In the URL, where it says <Account ID>, that needs to be your zone ID, not your account ID.

1 Like

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 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.