Well, technically it is illegal for a private citizen to tamper with US foreign relations, and about the only way to do that effectively is to be a presidential candidate and open side negotiations with a foreign power in anticipation of your possible election (e.g. to continue doing something or taking a position against American interests until you are in power and will give them a better deal).
In that case this is both an issue for the FBI (for the criminal aspect) and the CIA (for the working against US interests aspect).
Over the years there have been charges of presidential candidates tampering with US foreign policy: Nixon in Vietnam; Reagan with Iran. In both cases the candidate succeeded. The evidence for Reagan's involvement with Iraq is circumstantial at best, which is what you'd expect because if Reagan had violated the Logan Act it would have been William Casey who orchestrated it. But there IS solid evidence that Nixon did try to ensure that the North Vietnamese didn't agree to any ceasefires with Johnson -- not only a violation of the Logan Act, but since we were at war with the North Vietnamese quite possibly a rare actual case of treason.