Question would be if that would work if you manipulate dovecot without going through SOGo, as SOGo might not reflect changes in its UI.
Maybe trying SOGo API? Unfortunately one has to build it, its not readily available:
sudo npm install -g apidoc
cd sogo.git
apidoc -f ".*\\.m" -i UI -o Documentation/JSON-API
# then open Documentation/JSON-API/index.html in Browser