I don't know about how legal as pets, that probably is state region dependent. If you google bat houses there are tons of plans online for simple to elaborate construction. It is my understanding if you make a suitable house and locate it correctly they (wild ones) will find it and they eat huge amounts of insects. I would think it would actually be cruel to keep one inside and doubt you could feed it enough and enough variety of insects to keep it healthy, but if you put a home or two up where you could watch you could see them leave at dusk or return at dawn. You may even be able in interact when they come out if you had tasty treats for them?