This study investigated the performance of the electrocoagulation (EC) process for removing organic pollutants, as measured by chemical oxygen demand (COD), and reducing total dissolved solids (TDS) from real municipal wastewater sourced from the Euphrates River. A systematic approach was followed, where initial control tests were conducted to identify the optimal electrode configuration, which was a multipole arrangement of aluminum electrodes.The independent operating parameters studied were electrolysis time (10–60 min), applied current (0.2–1.4 A), and mixing speed (50–250 rpm). The response surface methodology (RSM), facilitated by a Box-Behnken design (BBD), was employed to model and optimize the EC process. The developed mathematical models revealed that the COD removal efficiency, final TDS value, and energy consumption were strongly dependent on the coagulation process parameters.The results showed that under the optimized conditions of 60 min of electrolysis time, 1 A of applied current, and 50 rpm mixing speed, a maximum COD removal efficiency of 92.43 % was achieved. At these optimal values, the final TDS concentration was reduced to 1299 ppm. The energy consumption for the batch EC process was also determined, with the lowest value being 5.47 kWh/m3.The findings demonstrate the effectiveness of the electrocoagulation process, particularly when utilizing a multipole electrode arrangement, for the treatment of real municipal wastewater. The developed models and optimization approach can be used to predict the performance and determine the optimal operating conditions for similar wastewater treatment applications. Future research prospects include investigating the removal of other pollutants, integrating the EC process with other treatment technologies, and evaluating the long-term economic feasibility of the system.