Twilio SendGrid

Reach customers using a flexible email API and marketing tools to increase customer engagement.

Sign up for SendGrid

Get the scoop on the acquisition

Twilio SendGrid

Announced at SIGNAL 2019

Ads New

Target your ads on Facebook, Instagram and Google Display Ads using data from your email lists and website activity. Don’t waste time jumping across applications. Manage all your campaigns in one UI.

Learn more about Ads

Email Validation API New

Validate email addresses before you send. Get AI-powered results in real time to catch typos in-form. Optimize your sign up experience and bounce fewer emails, which improves your sending reputation.

Learn more Email Validation

Send email with confidence using the most trusted email platform

Integrate and deliver email via SMTP or API in 5 minutes or less

Twilio SendGrid supports the programming languages, development frameworks, and client libraries you rely on, making it easy to customize your customer’s email experience.

Explore the API documentation

  • CuRL
  • Node
  • Ruby
  • Python
  • Go
  • PHP
  • Java
  • C#
curl --request POST \
  --url \
  --header "Authorization: Bearer $SENDGRID_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"personalizations": [{"to": [{"email": ""}]}],"from": {"email": ""},"subject": "Sending with SendGrid is Fun","content": [{"type": "text/plain", "value": "and easy to do anywhere, even with cURL"}]}'
// using SendGrid's v3 Node.js Library
const sgMail = require('@sendgrid/mail');
const msg = {
  to: '',
  from: '',
  subject: 'Sending with SendGrid is Fun',
  text: 'and easy to do anywhere, even with Node.js',
  html: 'and easy to do anywhere, even with Node.js',
# using SendGrid's Ruby Library
require 'sendgrid-ruby'
include SendGrid

from = '')
to = '')
subject = 'Sending with SendGrid is Fun'
content = 'text/plain', value: 'and easy to do anywhere, even with Ruby')
mail =, subject, to, content)

response = sg.client.mail._('send').post(request_body: mail.to_json)
puts response.status_code
puts response.body
puts response.headers
# using SendGrid's Python Library
import sendgrid
import os
from sendgrid.helpers.mail import *

sg = sendgrid.SendGridAPIClient(apikey=os.environ.get('SENDGRID_API_KEY'))
from_email = Email("")
to_email = Email("")
subject = "Sending with SendGrid is Fun"
content = Content("text/plain", "and easy to do anywhere, even with Python")
mail = Mail(from_email, subject, to_email, content)
response =
// using SendGrid's Go Library
package main

import (


func main() {
	from := mail.NewEmail("Example User", "")
	subject := "Sending with SendGrid is Fun"
	to := mail.NewEmail("Example User", "")
	plainTextContent := "and easy to do anywhere, even with Go"
	htmlContent := "and easy to do anywhere, even with Go"
	message := mail.NewSingleEmail(from, subject, to, plainTextContent, htmlContent)
	client := sendgrid.NewSendClient(os.Getenv("SENDGRID_API_KEY"))
	response, err := client.Send(message)
	if err != nil {
	} else {
require 'vendor/autoload.php'; // If you're using Composer (recommended)
// Comment out the above line if not using Composer
// require("/sendgrid-php.php");
// If not using Composer, uncomment the above line and
// download from the latest release here,
// replacing  with the path to the sendgrid-php.php file,
// which is included in the download:
$email = new \SendGrid\Mail\Mail();
$email->setFrom("", "Example User");
$email->setSubject("Sending with SendGrid is Fun");
$email->addTo("", "Example User");
$email->addContent("text/plain", "and easy to do anywhere, even with PHP");
    "text/html", "and easy to do anywhere, even with PHP"
$sendgrid = new \SendGrid(getenv('SENDGRID_API_KEY'));
try {
    $response = $sendgrid->send($email);
    print $response->statusCode() . "\n";
    print $response->body() . "\n";
} catch (Exception $e) {
    echo 'Caught exception: '. $e->getMessage() ."\n";
// using SendGrid's Java Library
import com.sendgrid.*;

public class Example {
  public static void main(String[] args) throws IOException {
    Email from = new Email("");
    String subject = "Sending with SendGrid is Fun";
    Email to = new Email("");
    Content content = new Content("text/plain", "and easy to do anywhere, even with Java");
    Mail mail = new Mail(from, subject, to, content);

    SendGrid sg = new SendGrid(System.getenv("SENDGRID_API_KEY"));
    Request request = new Request();
    try {
      Response response = sg.api(request);
    } catch (IOException ex) {
      throw ex;
// using SendGrid's C# Library
using SendGrid;
using SendGrid.Helpers.Mail;
using System;
using System.Threading.Tasks;

namespace Example
    internal class Example
        private static void Main()

        static async Task Execute()
            var apiKey = Environment.GetEnvironmentVariable("NAME_OF_THE_ENVIRONMENT_VARIABLE_FOR_YOUR_SENDGRID_KEY");
            var client = new SendGridClient(apiKey);
            var from = new EmailAddress("", "Example User");
            var subject = "Sending with SendGrid is Fun";
            var to = new EmailAddress("", "Example User");
            var plainTextContent = "and easy to do anywhere, even with C#";
            var htmlContent = "and easy to do anywhere, even with C#";
            var msg = MailHelper.CreateSingleEmail(from, to, subject, plainTextContent, htmlContent);
            var response = await client.SendEmailAsync(msg);

Build email marketing campaigns seamlessly

Design and send promotional emails using frustration-free campaign editing, powerful segmentation, and actionable analytics.

Learn more about email marketing campaigns

Build email marketing campaigns seamlessly

Monitor engagement in realtime from one platform

Optimize your transactional and marketing sends in realtime using tools like Event Webhooks, enhanced email activity feed, and history.

Monitor engagement in realtime from one platform

What you can do with Twilio SendGrid

Your customers look to their inbox as a source of information. Engage with them where they already are through personalized updates and promotions.

Transactional email

Quickly send and deliver your most important one-to-one emails like password resets, shipping notifications, security updates, and confirmation alerts.

Learn more about transactional email

Email marketing

Engage and retain your customers through promotional emails such as email newsletters, product announcements, sales alerts, reengagement campaigns, welcome series, and more.

Learn more about email marketing

One platform for complete customer engagement

Communicate with customers through email, SMS, voice, video, and more from one platform. Monitor email performance using shared templates and detailed email metrics.

Twilio SendGrid

The Twilio SendGrid difference

Proven deliverability
We offer authentication compliance, deliverability coaching, and proactive ISP outreach to ensure you achieve optimal inbox delivery.
Scale with confidence
Whether you’re a startup or a large enterprise, we can handle your important emails. Our world-class platform delivers more than 45 billion emails per month.
Email expertise
Now you have an expert in your corner. Our Customer Success and Support teams give you the information and guidance you need, when you need it.