No longer able to update DNS records via API

While, listing DNS records of a zone worked, for example:
will give me a JSON containing information of all DNS records in the zone.

But getting information of any specified DNS record fails, for example:
gives me ‘401 Unauthorized’.

And updating a DNS record doesn’t work with either PUT or PATCH methods:
result in error ‘405: Method Not Allowed.’

The full command line I used to update DNS record is:

    	wget --no-verbose --inet4-only \
    		--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    		--header "Content-Type: application/json" \
   		--method PATCH \
    		--body-data "{\"type\":\"A\",\"content\":\"$1\",\"proxied\":false}" \
    		--output-document -

I’m sure this API works on a few days early.

And I can also confirm the API token verification URL works:

$ wget --inet4-only --no-verbose --header "Authorization: Bearer <my-api-token>" --header "Content-Type: application/json" --output-document -
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Cookie coming from attempted to set domain to
{"result":{"id":"247b13d623488919122df69f3c13cc3f","status":"active"},"success":true,"errors":[],"messages":[{"code":10000,"message":"This API Token is valid and active","type":null}]}2020-01-21 02:54:36 URL: [184] -> "-" [1]

I am using a script from to update my IP on a daily basis.
Today I received an error message:
Record update failed. { "code": 1001, "error": "method_not_allowed" }

The script was running fine for the last 1-2 years.

I hav esimilar issues since today. I am using a Google Script to update DNS-Records and it was working fine at least until 18. of January. I did not change anything but now I am getting

{ "result": null, "success": false, "errors": [ { "code": 9021, "message": "Invalid TTL. Must be between 120 and 2,147,483,64....

and it I add “ttl” : “1” to my request it changes to

{ "result": null, "success": false, "errors": [ { "code": 1000, "message": "There was an unknown error." } ], "messag....

I am using Google’s UrlFetchApp…

Exactly the same problem. Since today 4:18am Berlin Time the script was unable to update the ip but it never got an error from the api. Only success has been logged by my script. :confused:

The error was reported at HTTP level, but it also responsed with a JSON that saying the same error message, shows by adding option --content-on-error to wget(1):

wget --inet4-only --header "Authorization: Bearer x" --header "Content-Type: application/json" --method PATCH --body-data '{"type":"A","content":"x","proxied":false}' --content-on-error --output-document -
--2020-01-21 09:08:11--
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving (,
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 405 Method Not Allowed
Saving to: 'STDOUT'

-                            [<=>                                ]       0  --.-KB/s               {
  "code": 1001,
  "error": "method_not_allowed"
-                            [ <=>                               ]      52  --.-KB/s    in 0s      

2020-01-21 09:08:13 ERROR 405: Method Not Allowed.

Yeah, same problem here.

I get this error message:
{"error": "Use of this API has been limited to the Cloudflare Dashboard."}
With "HTTP/1.1 401 Unauthorized, does someone know what is going on?

Same issue, unable to update DNS with script using API.

Funny, when updating DNS from different Zone I get {"code": 1000,"message": "There was an unknown error."}

Today, I found that the API method update DDNS is invalid. The error message is as follows:
“error”: “Use of this API has been limited to the Cloudflare Dashboard.”

Same here since today, i get this message:

“error”: “Use of this API has been limited to the Cloudflare Dashboard.”

Add me to the list. Happened to me yesterday, and i opened a support ticket, but just got their support-bot reply.

Can someone from CloudFlare actually look at this and explain why you disabled the APIs?

stuck with same problem
but in my case, finally i was able to modify DNS through API

problem was in quotes near some parameters
if i do
get an error

if i do without quotes - all works fine
here’s working curl request

auth_email="[email protected]"
curl -s -X PATCH  "$zone_identifier/dns_records/$record_identifier" \
-H "X-Auth-Email: $auth_email" \
-H "X-Auth-Key: $auth_key" \
-H "Content-Type: application/json" \
--data "{\"id\":\"$zone_identifier\",\"type\":\"$type\",\"name\":\"$record_name\",\"content\":\"$content\",\"ttl\":1,\"proxied\":$proxied}"
1 Like

Modifying or adding a record works. It’s the GET or DELETE that seems to have been shut off

For me GET works but not PUT/PATCH methods.

For me GET method is working but PUT method is not working
This is working for me since 2019‑04 until today it’s not working anymore :confused:
Is Cloudflare change something about API?

1 Like

+1 Same for me.
I used to update A record through curl PUT for roughly one year but receive “Unknown error 1000” starting from 21/01 on. user2527’s suggested approach does not work for me, even leaving out the quotes I receive the error mentioned. Any help is greatly appreciated.

Hi @cloudflake, @tackleza, I suspect it’s the issue we’re seeing with the API that’s affecting you, Cloudflare Dashboard and Cloudflare API service issues. Sorry for the troubles, the team is on it.


It’s not resolved.

2020-01-21 19:46:33,706 INFO Updating record: XXX proxied:False id:14c3xxxx…
2020-01-21 19:46:33,941 ERROR Request failed: {
“error”: “Use of this API has been limited to the Cloudflare Dashboard.”

Agreed. Not resolved.

Still not working :frowning: