I have answered my own question, putting here to help others. Using JSON-RPC:
Disable an interface:
curl -d '[{"jsonrpc": "2.0", "id": 102, "method": "call", "params": [ "<Your session ID>", "uci", "set", {"config": "network", "section": "<Your interface>", "values": { "disabled": "1", "auto": "0"}}]},{"jsonrpc":"2.0","id":309,"method":"call","params":["<Your session ID>","uci","apply",{"timeout":10}]}]' http://192.168.8.1/ubus
Enable:
curl -d '[ { "jsonrpc": "2.0", "id": 172, "method": "call", "params": [ "<Your session ID>", "uci", "delete", { "config": "network", "section": "<Your interface>", "options": [ "auto", "disabled"]}]}, {"jsonrpc":"2.0","id":309,"method":"call","params":["<Your session ID>","uci","apply",{"timeout":10}]}]' http://192.168.8.1/ubus