Good Morning,
I seem to be having an issue with creating new zones via the API. The following is the command run against the API, and the response:
curl -X POST https://api.cloudflare.com/client/v4/zones -H Content-Type:application/json -H X-Auth-Key:MyKeyPass -H X-Auth-Email:MyEmailAddress -s --data ‘{“name”:“exampledomain.co.za”,“jump_start”:true,“organization”:{“id”:“MyAccountID”,“status”:“active”,“permissions”:[“#analytics:read”,“#app:edit”, “#billing:edit”, “#billing:read”, “#cache_purge:edit”, “#dns_records:edit”,“#dns_records:read”, “#lb:edit”,“#lb:read”, “#logs:read”, “#member:edit”, “#member:read”,“#organization:edit”, “#organization:read”, “#ssl:edit”, “#ssl:read”,“#waf:edit”, “#waf:read”, “#zone:edit”, “#zone:read”, “#zone_settings:edit”, “#zone_settings:read”]}}’
- jq .
{
“success”: false,
“errors”: [
{
“code”: 1068,
“message”: “Permission denied”
}
],
“messages”: ,
“result”: null
}
I’m able to create new records within a zone using the same credentials, and when using the wrong org_id (when attempting to create a zone), I receive a code 1067 error, so it would seem as if the values used are correct.
Please advise?! Am I forgetting something?
Thanks,
G