Here's more about the Annexation of Texas.
Note: Texas was never annexed by a proper "treaty." It was annexed by a Joint Resolution of Congress.
Annexation by joint resolution
James K. Polk, a Democrat and a strong supporter of territorial expansion, was elected president in November 1844 with a mandate to acquire both the Republic of Texas and Oregon Country. After the election, the Tyler administration realized that public opinion was in favor of annexation, consulted with President-elect Polk, and set out to accomplish annexation by means of a joint resolution. The resolution declared that Texas would be admitted as a state as long as it approved annexation by 1 January 1846, that it could split itself up into four additional states, and that possession of the Republic’s public lands would shift to the state of Texas upon its admission. On 26 February 1845, six days before Polk took office, Congress passed the joint resolution. Not long afterward, Andrew Jackson Donelson, the American chargé d'affaires in Texas and the nephew of former president Andrew Jackson, presented the American resolution to President Anson Jones of Texas. In July 1845, the Texan Congress endorsed the American annexation offer with only one dissenting vote and began writing a state constitution. The citizens of Texas approved the new constitution and the annexation ordinance in October 1845 and Polk signed the documents formally integrating Texas into the United States on 29 December 1845.
This is also interesting...
End result is the Texas annexation by Joint Resolution was found to be legal.Controversy over legality of annexation
The original controversy about the legality of the annexation of Texas stems from the fact that Congress approved the annexation of Texas as a territory with a simple majority vote approval instead of annexing the land by Treaty, as was done with Native American lands. After the United States and The Republic of Texas were unable to reach a Treaty agreement, Congress passed a Joint Resolution for Annexing Texas to the United States. The Republic of Texas' Annexation Convention then submitted the Ordinance of Annexation to popular vote in October 1845 and the public approved the measure. This Ordinance of Annexation was submitted and approved by the House and Senate of the United States and signed by the President on December 29, 1845. While this was an awkward, if not unusual, treaty process it was fully accepted by all parties involved, and more importantly all parties performed on those agreements making them legally binding (see Contract Law). In addition, the United States Supreme Court decided in the case of DeLima v. Bidwell, 182 U.S. 1 (1901), that annexation by a joint resolution of Congress is legal.