add wait option to POST /commands