An embassy is a building where diplomats from one world can live and/or work on the territory of another. Many worlds had embassies on Earth, which was the capital of the United Federation of Planets. A consulate is a sub-division of an embassy.
During the 22nd century, the Vulcans had consulates in Berlin, Canberra, and San Francisco. (ENT: "Fusion", "Terra Prime")
The United Earth Embassy on Vulcan was bombed in 2154. (ENT: "The Forge")
In the mid-2270s, Commander Sonak was killed in a transporter accident while beaming up to the USS Enterprise. Admiral James T. Kirk asked Starfleet Command to send his condolences to his family, as they could be reached through the Vulcan embassy. (Star Trek: The Motion Picture)
Early in his Obsidian Order career, Elim Garak was posted to the Cardassian embassy on Romulus. According to Garak, however, he was merely a gardener there. (DS9: "Broken Link", "Inter Arma Enim Silent Leges")
Lisa Cusak once worked at the Federation embassy on Andor. While there she started a long relationship with an Andorian who worked at the Andorian Agricultural Ministry. (DS9: "The Sound of Her Voice")
Verad was the communications clerk of the Federation consulate on Khefka IV. (DS9: "Invasive Procedures")
The Klingons and the Federation maintained consulates, and the Vulcans an embassy, on Deep Space 9's Promenade by 2370. (Star Trek: Deep Space Nine set decoration)
One of Odo's friends in Starfleet Intelligence was formerly assigned to the Federation embassy on Qo'noS. This friend of Odo's still had a contact with a former agent of Klingon Intelligence by 2371. (DS9: "Visionary")
Gul Dukat suggested that if he was to get his position back as military adviser to the Detapa Council, he would post Gul Marratt to the Cardassian embassy on Breen in 2372. (DS9: "Return to Grace")
In 2374, the Orion Syndicate mounted a failed attempt to break into the Klingon embassy on Farius Prime to assassinate their ambassador. (DS9: "Honor Among Thieves")