In 1986, US Foreign Service Office Walter Burges Smith created a database of US diplomats and consuls who served between 1776 and 1865 and wrote a book interpreting the results and commenting on the source base.
Here’s the full citation:
Walter Burges Smith, America’s Diplomats and Consuls of 1776-1865: A Geographic and Biographic Directory of the Foreign Service from the Declaration of Independence to the End of the Civil War (Arlington VA: Center for the Study of Foreign Affairs, 1986).
The book is available as a free PDF via the Hathi Trust.