I am trying to purge through cloudflare API using
curl -X POST "https://api.cloudflare.com/client/v4/zones/xxx/purge_cache" -H "Authorization: Bearer xxx" --data '{"hosts":["dev.mydomain.co.uk"]'
But it is giving me an error
{"success":false,"errors":[{"code":1012,"message":"Request must contain one of \"purge_everything\", \"files\", \"tags\", \"hosts\" or \"prefixes\""}],"messages":[],"result":null}%
I don’t understand because hosts in part of the request?