Most likely the apartment forbids it. Start with your lease before you move on to local zoning, because even if the city allows it (unlikely), the apartment rules are probably more restrictive, and controlling.
Typically, apartments are medium or high density residential. and typically, cities...