(Bloomberg) -- Twilio Inc. shares rose in extended trading after the software company raised its profit outlook for the year and reported quarterly sales and profit that topped analysts’ estimates.

Annual adjusted income will be $350 million to $400 million, from a forecast in May of as much as $350 million, the company said Tuesday in a statement.

Twilio, known for its communications services such as direct-to-consumer messaging, has been grappling with a rapid slowdown in revenue growth. It has also focused on improving profitability, announcing two rounds of job cuts over the last year. The company had 6,428 employees at the end of June, a decline of almost 29% from a September peak of 8,992.

Chief Executive Officer Jeff Lawson said in the statement that the company is “committed to our focus of driving efficient growth across our business.”

The shares gained about 7% in extended trading. Earlier, the stock had declined 5.2% to close at $58.40 in New York after software peer Datadog Inc. cut its revenue forecast. Twilio’s rally this year — 19% — lags behind the 34% increase in the iShares Expanded Tech-Software Sector ETF.

In the second quarter, sales increased 10% to $1.04 billion, compared with analysts’ average estimate of $986 million. It marked Twilio’s slowest rate of growth since becoming a public company in 2016. Profit, excluding some items, was 54 cents a share in the period ended June 30. Analysts, on average, projected 29 cents, according to data compiled by Bloomberg. The company added 304,000 active customer accounts in the quarter, in line with estimates.

Still, the software company projected revenue in the current quarter that fell short of estimates. Sales in the third quarter will be about $985 million. Analysts, on average, expected $1.02 billion. Adjusted profit will be about 35 cents per share, exceeding estimates.

A special class of shares, which conferred additional voting power held before Twilio’s 2016 initial public offering by early employees and investors, converted into common stock last month. That change may help spur interest activist investors in the future. Management has met with activist Legion Partners, the Information reported in May.

©2023 Bloomberg L.P.