The short answer is 'Yes'.
The initiative was taken by James K. Polk who sent an envoy, John Slidell, in November 1845 following Mexico's severing of diplomatic relations with the US. Referring to Texas,
Polk had instructed Slidell to insist that the Mexicans recognize
annexation as a fait accompli. Most surprisingly, Slidell had also
been told to purchase Upper California and New Mexico and to use the
perennial complaint of unpaid American claims against Mexico to
pressure and facilitate the sale.
Source: Brian Delay, 'War of a Thousand Deserts: Indian Raids and the U. S. -Mexican War' (2008)
Citing B. Mills in U.S.-Mexican War (2003), Wikipedia states that Polk authorized Slidell
to offer Mexico around $5 million for the territory of Nuevo México
and up to $40 million for Alta California.
Although Polk had insisted on secrecy, the press found out before Slidell had even arrived in Veracruz. This caused a storm in Mexico where the administration of President Herera was already pressure due to its failed policy towards Texas. Consequently, the Mexican government
refused to receive Slidell in his formal capacity, but the mere
suggestion of selling national territory undermined the tottering
administration all the more.
In January 1846, shortly after the Mexican president José Joaquín de
Herrera had refused to receive Slidell in his official capacity, but
before the envoy finally abandoned his mission, Polk ordered General
Zachary Taylor to march his forces to the Rio Grande. This
extraordinarily provocative move made war all but inevitable.
A less direct attempt had been made to buy California in 1842. This came about due to numerous incidents of stolen American property in Mexico and American ships being seized in Mexican ports. As a result,
In 1839 there was arbitration between the two countries, and an award
of $2 million to the Americans, to be paid in 20 installments. Mexico
quickly fell behind on the payments, and new claims continued to pile
up. In 1842, a frustrated President Tyler proposed that Mexico hand
over California as compensation, with the US government to pay off
American claims, but the Mexicans refused.