It depends on whether the apartment is your habitual residence. If you habitually live in that apartment as a family residence, you do need your wife’s consent to sell it, even if it is your private property by inheritance. The protection of the habitual family residence is independent of who is the owner. If, on the contrary, it is a second property where you do not live habitually (for example, an inheritance that you have rented), then you can sell it by yourself without the consent of your wife.