Sermamagny () is a commune in Territoire de Belfort, a department in Bourgogne-Franche-Comté in northeastern France.