It seems most likely to me that this "coup" was an Erdogan false flag done in order to cement his own hold on power, especially when you take into consideration the following factors:
1. How weak the military coup was, basically the size of a battalion, which is only useful if you want to take over a few city blocks, not an entire nation and its government.
2. The fact that many arrested "rebel" soldiers claimed they had been told they were on a military exercise. Perhaps they were trying to talk their way out of their own treason, but that's unlikely when considered in combination with factors 1 and 3.
3. Erdogan's "hit list" for responding to the coup looks an awful lot like an actual hit list. How convenient the coup turned out to be, especially when you seemingly have tens of thousands of names and institutions ready to be rolled over immediately in the aftermath.
But besides Erdogan intrigue, the most fascinating thing for me here is how this may eventually affect the US, with its joint airbase at Incirlik and its nuclear weapons housed there. The Erdogan regime has attempted to scapegoat the US for what occurred. He is also inexplicably cozying back up with Putin again after the shootdown fallout. Although his motives here are unclear, would Erdogan ever be willing to move in on Incirlik and its American assets, possibly even its nukes? Unlikely, but a question I imagine many intelligence men are keeping long hours now pondering.
One thing is for certain, a Moscow-Tehran-Ankara axis is something that can never be allowed by the US. If the Turkish coup really was an American operation, it sounds about like the kind of mismanaged, inept handling that has unfortunately come to characterize our intelligence community over the past couple of decades. And if it was truly an American operation, which I found more unlikely than the cause I mention above, then that makes the threat posed by Erdogan to American assets in the region even greater.