Update web documentation for new API

(the example from the doc could be simpler if we kept a string key instead of using the private key type but we favor showing good practice over simplicity here).