The official profile of Elon Musk on the social network Twitter.The official profile of Elon Musk on the social network Twitter.

A new filing with the Securities and Exchange Commission sheds light on the early conversations that took place between the board and Musk, as he decided to join the board and later abandon his plan to take over the company.

The board agreed to sell the company to Musk for $44 billion, but he said the deal is on hold as he studies the number of bot accounts on the platform.

The filing shows that Musk reached out to Jack Dorsey to discuss the future direction of social media, beginning on March 26.

On the day after, Musk spoke with the board of directors about joining, trying to take the company private or starting a competitor.

After meetings between board members with Musk that included lawyers and bankers, they reached an agreement on Musk joining the board in early April, contingent on a background check and other customary procedures.

On April 4, Musk reached out to Dorsey. According to the filing, Musk was told by Dorsey that he believes the company would be better off as a private company. Musk asked if he would stay on the board even though he had already left.

Musk's appointment to the board was set to go into effect on April 9 after the board completed his background check. Ahead of that date, Musk and Agrawal continued to talk about the business and products of the company. Before the appointment came into effect, Musk told Taylor and Agrawal that he would no longer be joining the board and would instead make an offer to take the company private.

That set off a frenzied few weeks where Musk made what he called his "best and final" offer to buy Twitter for $54.20 per share. The poison pill was adopted by the board to prevent Musk from moving forward with a hostile takeover. He then floated the idea of a tender offer, appealing to shareholders directly in a takeover, which again seemed to impact the decision of the board on whether to accept Musk's initial offer.

In the deliberations over the bid, the filing reveals, the board considered its historical challenges in growing the business and decided it was unlikely that other potential buyers would be interested. They thought that Musk's first offer was the best value that the company could reasonably get from him.

The board agreed to the deal. Musk revealed on May 5 that he was talking with existing stockholders about retaining equity in the new company. According to the filing, Dorsey told the company that he could end up holding equity in the firm.

Since Musk made the offer, Twitter's stock has fallen along with the broader market, raising questions about whether the deal can still make it across the finish line. Musk said that he could try to change the price.

You can subscribe to CNBC on the internet.

Is the takeover deal in danger after Musk announced a 9% stake?