Naturally, hedgehogs are not social animals. As such, you should be careful not to house them together unless you are sure that they won’t fight each other because they can badly hurt or even kill each other. If you need two hedgehogs and are not sure if they can share a cage, have two cages just in case they decide otherwise. Also remember, hedgehogs can seem to be okay with sharing a cage for a few days or even weeks then one day they decide, or one decides otherwise. To prevent any dangers, always keep an eye on your hedgehogs and be ready with an extra cage for such moments. Also, remember to put two of everything in a shared cage to avoid conflicts and go for a spacious cage.
However, some hedgehogs respond very well to a new friend to the point of even becoming more active. But, always make sure that you are not housing males and females in the same cage unless they are neutered and spayed.