Is co-sleeping/bed sharing safe.

Brooklyn
My little guy is 2 weeks old and won't sleep in his bassinet so my boyfriend and I do shifts and hold him while he sleeps. I put him in bed with us and he sleeps like a rock. Is all 3 of us in bed unsafe? How can I make it safe?