See lines 151-166 in https://github.com/spesmilo/electrum/blob/master/electrum/commands.py
With Curl:
curl --data-binary '{"id":"curltext","method":"restore","params":{"text":"word1 word2 word3...""}}' http://user:[email protected]:7777
As for working with multiple wallets, that's a bit hacky but I figured out switching between them can be done by using the "setconfig" command. For example:
curl --data-binary '{"id":"curltext","method":"setconfig","params":{"key":"wallet_path","value":"path/to/wallet1"}}' http://user:[email protected]:7777
switches to wallet1 file. It's then possible to work with any number of wallet files without restarting the electrum daemon (as I previously thought will be necessary).
I wish they'd publish a full reference for the RPC API, it is tricky to figure out what goes where.
I didn't know that's possible. There aren't any clear documentation about electrum's command, expect inline help (electrum help
You're welcome