What kind of ebike are you building? Is it a DC motor powered right off a battery or does it have a controller box, Controllers always have a low current line that you switch to turn it on or off. Show a listing of what you plan to use if you don't know where it is,
Most Ebike controllers also have brake inputs which turn off the motor and leave the controller running. Well, I've never seen one that didn't have brake switches, but it's a big world,