The Federation Diplomatic Corps (sometimes referred to as the Federation Diplomatic Service, Federation Diplomatic Corps Service Bureau and as the Federation Diplomatic Office) is the division of the Federation Department of the Exterior which is responsible for negotiating treaties with foreign states and maintaining inter-state relations and diplomacy within the Federation.
It is composed of Federation ambassadors, and executes the foreign policy set by the Federation President, Federation Council, and Federation Secretary of the Exterior. The Diplomatic Corps often works closely with the Federation Starfleet.
The Federation Diplomatic Corps are widely considered to be obstinate and an impediment to the effective implementation of foreign policy by many in the Federation government and Starfleet. Nonetheless, its negotiating skills have proven invaluable in maintaining relatively good relations with many foreign states. (TOS novelization: Star Trek V: The Final Frontier) (TNG movie: Star Trek: Insurrection; SCE eBook: Interphase, Part One; ST novel: Articles of the Federation, et. al.)
This division grants diplomatic immunity for many ambassador-grade emissaries and dignitaries, including those of normally hostile governments conducting relevant business with the Federation. However, it is uncommon for military officers to be accorded immunity. A corollary to this immunity ensures safe passage within Federation space. (FASA RPG module: Star Trek IV Sourcebook Update).
Prior to 2280 St. John Talbot had negotiated a treaty between Capella and Xenar, preventing an interstellar war. This treaty earned St. John the Surakian Peace Prize and an assignment to Andor. (TOS novelization: Star Trek V: The Final Frontier)
In 2285, the Diplomatic Corps began a major initiative to create a treaty to prevent the proliferation of Genesis Device technology by the other interstellar states who suspected to use the technology of Project Genesis as a weapon of war. (TNG novel: The Genesis Wave, Book One)
Curzon Dax knew a female member of the Diplomatic Corps. Jadzia Dax talked to her in 2372, and she told her of Federation worlds near the Klingon border were calling for preemptive strike on the Empire. (DS9 episode: "Broken Link")