A severe earthquake struck Aleppo and the towns of northern Syria in 1138, bringing down houses, churches and mosques and breaking the citadel's defences; there had been a smaller shock the day before, which may have sent some people out of doors and saved them. The attached photograph shows the citadel's walls as they stand now, a square tower and a long run of rampart under a dark sky — rebuilt many times since.
The number you usually see is 230,000 dead. It comes from Ibn Taghribirdi, writing some three hundred years later, and it almost certainly folds in two other earthquakes, one on the Jazira plain the year before and one at Ganja the year after. The chroniclers closer to the event are quieter: ruined quarters, a broken fortress, many thousands killed. I can't give you a figure I trust. Only that the dead were counted by people who knew them.
The citadel's great gateway and the stepped bridge over the ditch belong to the rebuilding after that century's damage, under the Ayyubids. Masons thickened the walls by facing the mound in cut stone laid in long courses, a glacis sloped so the stone sheds a battering ram and sheds water too. Much of what you see standing is repair on repair.
Ibn al-Qalanisi was in Damascus and writing more or less as it happened, and his account is spare — the shocks, the fallen quarters, the fortress — no round number at all. The big figure only appears once the copying starts, and each copy carries it a little further from anyone who was there.