Communications and engagement software company Twilio (TWLO -2.14%) was a high flyer a couple of years ago when tech stocks dominated Wall Street. But last year's bear market put the stock down, and shares have yet to get back on their feet.

Had you had the unfortunate timing of investing $1,000 in July 2021, you would be sitting on less than $170 today, more than an 80% decline. Yes, the bear market was a whopper that sent many stocks crashing -- most haven't come close to recovery yet, either.

But there is more going on here that investors should know about. I'll explain Twilio's struggles and whether investors should buy into the idea of a potential rebound.

What does Twilio do?

Investors should always know what they buy, and Twilio is a SaaS stock that sells software APIs (application programming interfaces). These APIs let companies build messaging and customer engagement tools into their websites or apps, including texting, phone calls, and video.

Twilio also offers newer tools such as Flex, a digital engagement center designed for sales and customer service applications, and Engage, which helps companies advertise using data. You can think of Twilio as a company that provides digital tools to help businesses communicate, interact, and engage with their customers.

Why is Twilio's stock down so much?

The direction of the broader stock market can act like a tide that raises and lowers all the boats. You might see both blue chip and speculative stocks fall during a bear market. But it's usually the companies with solid fundamentals, such as proven business models, growth, and profits, that recover and eventually set new highs. Twilio's sharp decline isn't abnormal in that way. However, peeking under the hood exposes some potential trouble at Twilio that helps explain why shares are down so much.

Three vital financial metrics help illustrate the problem. For starters, Twilio's revenue growth has slowed to a crawl. Management has cited economic headwinds, a common phrase on Wall Street in recent quarters, as a big reason for this. This could make sense since Twilio bills its customers on a usage-based model. In other words, if Twilio's customers are less active, it will trickle back to Twilio's performance too.

But revenue growth isn't the only problem. Twilio's gross profit margins have declined significantly too. The company's core messaging business has never commanded very high margins (compared to other software companies), but to see margins decline as revenue growth slows is a potential red flag.

Charts showing Twilio's revenue, gross profit margin, and free cash flow all down since 2021.

TWLO Revenue (Quarterly YoY Growth) data by YCharts

Lastly, Twilio's free cash flow has plunged from roughly breakeven to heavy outflows. The company's employee count exploded higher as it built up its newer Flex and Engage businesses, but that's not doing the stock any favors with this timing. Add it all up, and you'll see Twilio's financials have worsened significantly in recent quarters.

What does the future hold for Twilio and its shareholders?

It's not all bad news. Twilio is very well-funded, so there's little risk of its needing to seek bankruptcy protection for the foreseeable future. Twilio has roughly $4 billion in cash against just $987 million in debt. Given the company's trailing 12-month cash burn, that's enough net cash to fund the business for almost a decade before running out. Additionally, management began layoffs and cutting costs to focus on profitability earlier this year, though the company may not turn GAAP profitable until 2027.

On the one hand, the stock is now very cheap. Shares trade at just three times sales, near its lowest as a public company. On the other hand, the stock may also be cheap for a good reason. Investors should keep their eye on Twilio. Perhaps wait to see revenue growth accelerate, and margins begin bouncing back, before putting your capital at risk.

Numbers don't lie. Unfortunately, Twilio's numbers no longer tell a very good story.