In January 1916, Arthur Zimmermann, foreign secretary of Germany, send a coded telegram to German’s ambassador to Mexico. This telegraph was intercepted by British agents and decoded, exposing its contents. Within the telegraph Zimmermann wrote to their ambassador to Mexico, that if America looked to join the war, they (Germany) should approach the Mexican government and offer support and reward their support in return for Mexico’s allegiance in the war. This telegraph was exposed to the American public in March, leading to widespread anger, and thus contributed to the declaration of war in April.
Had the telegraph not been intercepted, or had the attempts to decode it failed, there was plenty of other causes that justified America’s entrance into the war. Furthermore, Mexico had analyzed Germany’s proposition and concluded that war with America wouldn’t achieve their goals of recapturing lost territories, nor would it be beneficial.