The full detail of the exchanges between Scottish Government advisers and the Sun newspaper, which broke the story, as well as phone calls by Ms Sturgeon and her senior spokesman, have also been revealed in a Freedom of Information release.
They include a ten-minute call which went through midnight as the crisis surrounding Mackay’s text exchanges with a 16-year-old boy were emerging.
Mackay quit on the morning of 6 February, the day he was scheduled to deliver the budget at Holyrood, after it emerged that he had sent a string of “inappropriate” texts to the youngster.
Some opposition leaders have been critical of Ms Sturgeon for not sacking Mr Mackay as soon as his behaviour came to light, insisting he should not have been afforded the opportunity to resign.
It has now emerged that Ms Sturgeon made four phone calls to one adviser on the evening of 5 February which resulted in two conversations.
The SNP leader also made two phone calls to ministers leading to one conversation. She also received one phone call from a minister.
Her senior political spokesman made two phone calls and sent three text messages.
The calls logged included a ten-minute conversation which started at 11.58pm, just after a nine-minute conversation which got under way at 11.47pm.
Mackay said in a statement the following morning: “I take full responsibility for my actions. I have behaved foolishly and I am truly sorry.
“I apologise unreservedly to the individual involved and his family.”
He is said to have contacted the boy “out of the blue” and sent about 270 messages on Instagram and through Facebook. In one of the exchanges it is claimed that Mr Mackay told the teenager he was “cute”.
Mr Mackay remains an MSP but has not returned to Holyrood since the row broke over a month ago. The SNP say has been unwell during this period.
The Freedom of information release, which was published on the Scottish Government’s website, shows that Ms Sturgeon’s spokesman sought “justification for publication”, adding there had been an “intrusion into private and family life”. The spokesman also requested to know the name of the individual involved.
Mackay has been suspended by the SNP and has not been seen in public since the scandal broke. Under parliamentary rules, parties cannot force individuals to resign their seats.