Can I update a bitbucket deployment environment to enable admin_only

I am trying to use this documentation to update the admin_only option under restrictions.

curl -X PUT \
  -u <username>:<app_password> \
  -H "Content-Type: application/json" \
  -d '{
        "restrictions": {
            "admin_only": true
        }
      }' \
  https://api.bitbucket.org/2.0/repositories/<workspace>/<repo_slug>/deployments_config/environments/<environment_uuid>

This is returning a 405 and the {"type": "error", "error": {"message": "Method not allowed"}} which I am guessing what I am trying is not possible.