Petitmagny is a commune. It is in Bourgogne-Franche-Comté in the Territoire de Belfort department in northeast France.