Firewall rule edit by CURL - API

I want to edit firewall rule from CURL, but I get authentification error:

curl -X POST "https://api.cloudflare.com/client/v4/zones/xxx/firewall/access_rules/rules/xxx" \
     -H "X-Auth-Email: [email protected]" \
     -H "X-Auth-Key: xxx" \
     -H "Content-Type: application/json" \
     --data '{"mode":"challenge","configuration":{"target":"ip","value":"1.1.1.1"},"notes":"test"}'

{"success":false,"errors":[{"code":10000,"message":"Authentication error"}]}

What is incorrect in this code?

PS. I’ve using Global API key.

Or second method:

curl -X PUT \
     -H "X-Auth-Email: xxx" \
     -H "X-Auth-Key: xxx" \
     -H "Content-Type: application/json" \
     -d '[
  {
    "id": "xxx",
    "paused": false,
    "description": "challenge site",
    "action": "challenge",
    "priority": null,
    "filter": {
      "id": "xxx",
      "expression": "not http.request.uri.path matches \"^/api/.*$\"",
      "paused": false,
      "description": "not /api"
    }
  }
]' "https://api.cloudflare.com/client/v4/zones/xxx/firewall/rules"

There is same error.

Are you still encountering this issue?