Shares of Twilio fell more than 4 percent in extended trading after the announcement. SendGrid jumped about 15 percent.
SendGrid offers companies a cloud-based service for sending emails at a large scale. The acquisition allows software developers to "manage all of their important communication channels — voice, messaging, video, and now email as well," Twilio said in a statement.
Twilio offers software for secure messaging platforms and competes with companies such as Avaya and Cisco.
"Increasingly, our customers are asking us to solve all of their strategic communications challenges — regardless of channel. Email is a vital communications channel for companies around the world, and so it was important to us to include this capability in our platform," Twilio CEO Jeff Lawson said in a statement.
Twilio stock has far outpaced the overall market this year, up more than 220 percent in 2018. As of Monday's close, shares were within 14 percent of 52-weeks highs.
The all-stock transaction is expected to close in the first half of 2019.