Well, it finally happened. Groupon's board ousted CEO Andrew Mason on Thursday.

"After four and a half intense and wonderful years as CEO of Groupon, I've decided that I'd like to spend more time with my family. Just kidding--I was fired today. If you're wondering why... you haven't been paying attention," wrote Mason in a farewell letter to Groupon employees.

Since going public in 2011, the daily deals company has struggled to cope with disappointing earnings and investors' skepticism. 

Mason's resignation letter--part love note and part apology--didn't contain any of the finger-pointing or inuendos typical of high-profile firings. Instead, Mason addressed Groupon's failings in the past year and his accountability as a leader.

"As CEO, I am accountable," he declared. "You are doing amazing things at Groupon, and you deserve the outside world to give you a second chance. I'm getting in the way of that."

Groupon's stock dropped 20 percent after the company released its fourth quarter earnings. The company's stock has gained 10 percent--and counting--since the announcement of Mason's departure.

In a press release, Groupon's Chairman Eric Lefkofsky thanked Mason for his leadership and creativity at Groupon, adding: "As a founder, Andrew helped invent the daily deals space, leading Groupon to become one of the fastest growing companies in history."

Eric Lefkofsky has been named interim CEO, along with vice chairman Ted Leonsis.

"For those who are concerned about me, please don't be," Mason wrote. "I love Groupon, and I'm terribly proud of what we've created. I'm OK with having failed at this part of the journey."

And he offered the company one final piece of advice: 

Have the courage to start with the customer. My biggest regrets are the moments that I let a lack of data override my intuition on what's best for our customers. This leadership change gives you some breathing room to break bad habits and deliver sustainable customer happiness--don't waste the opportunity!

Read Andrew Mason's complete resignation letter here.