SlideShare a Scribd company logo
API Workshop




#SGDelivered
Hi, I’m Brandon.
               @brandonmwest
               brandon.west@sendgrid.com




#SGDelivered
What is SendGrid?




#SGDelivered
What is SendGrid?

 • Cloud-based SMTP provider




#SGDelivered
What is SendGrid?

 • Cloud-based SMTP provider
 • Massively scalable




#SGDelivered
What is SendGrid?

 • Cloud-based SMTP provider
 • Massively scalable
 • Analytics on emails you send




#SGDelivered
What is SendGrid?

 • Cloud-based SMTP provider
 • Massively scalable
 • Analytics on emails you send
 • Robust APIs for developers to integrate




#SGDelivered
SendGrid Delivered API Workshop
If you learn 1 thing...




 SendGrid > Email
 Relay
#SGDelivered
APIs Overview

  Q: Why should I care about the SendGrid APIs?




#SGDelivered
APIs Overview

  Q: Why should I care about the SendGrid APIs?

  A: There are a lot of reasons, but the




#SGDelivered
APIs Overview

  Q: Why should I care about the SendGrid APIs?

  A: There are a lot of reasons, but the
     • Reduce code complexity




#SGDelivered
APIs Overview

  Q: Why should I care about the SendGrid APIs?

  A: There are a lot of reasons, but the
     • Reduce code complexity
     • Deeper analytics & tracking




#SGDelivered
APIs Overview

  Q: Why should I care about the SendGrid APIs?

  A: There are a lot of reasons, but the
     • Reduce code complexity
     • Deeper analytics & tracking
     • Less resource consumption




#SGDelivered
APIs Overview

  Q: Why should I care about the SendGrid APIs?

  A: There are a lot of reasons, but the
     • Reduce code complexity
     • Deeper analytics & tracking
     • Less resource consumption
     • Better UX


#SGDelivered
Why Use SendGrid?



 Time is valuable.
Especially developer time.


#SGDelivered
APIs Overview
   What APIs does SendGrid Offer?




                      API

#SGDelivered
APIs Overview
   What APIs does SendGrid Offer?
          • SMTP API




                        API

#SGDelivered
APIs Overview
   What APIs does SendGrid Offer?
          • SMTP API
          • Web API




                        API

#SGDelivered
APIs Overview
   What APIs does SendGrid Offer?
          • SMTP API
          • Web API
          • Newsletter API




                              API

#SGDelivered
APIs Overview
   What APIs does SendGrid Offer?
          • SMTP API
          • Web API
          • Newsletter API
          • Reseller API




                              API

#SGDelivered
APIs Overview
   What APIs does SendGrid Offer?
          • SMTP API         • Subuser API
          • Web API
          • Newsletter API
          • Reseller API




                                API

#SGDelivered
APIs Overview
   What APIs does SendGrid Offer?
          • SMTP API         • Subuser API
          • Web API          • Credentials API
          • Newsletter API
          • Reseller API




                                API

#SGDelivered
APIs Overview
   What APIs does SendGrid Offer?
          • SMTP API      • Subuser API
          • Web API       • Credentials API
          • Newsletter API • Event Webhook
          • Reseller API




                              API

#SGDelivered
APIs Overview
   What APIs does SendGrid Offer?
          • SMTP API      • Subuser API
          • Web API       • Credentials API
          • Newsletter API • Event Webhook
          • Reseller API   • Inbound Parse Webhook




                             API

#SGDelivered
SMTP API
   Custom SMTP header that contains instructions on
   how to process your email

                X-SMTPAPI: { ... }

   Add extra information, filters, & manipulations:




#SGDelivered
SMTP API
   Custom SMTP header that contains instructions on
   how to process your email

                  X-SMTPAPI: { ... }

   Add extra information, filters, & manipulations:
       • Define multiple recipients




#SGDelivered
SMTP API
   Custom SMTP header that contains instructions on
   how to process your email

                  X-SMTPAPI: { ... }

   Add extra information, filters, & manipulations:
       • Define multiple recipients
       • Text Substitutions




#SGDelivered
SMTP API
   Custom SMTP header that contains instructions on
   how to process your email

                  X-SMTPAPI: { ... }

   Add extra information, filters, & manipulations:
       • Define multiple recipients
       • Text Substitutions
       • Categories



#SGDelivered
SMTP API
   Custom SMTP header that contains instructions on
   how to process your email

                  X-SMTPAPI: { ... }

   Add extra information, filters, & manipulations:
       • Define multiple recipients
       • Text Substitutions
       • Categories
       • Unique arguments / Identifiers


#SGDelivered
SMTP API
 Example: Billing notification
     X-SMTPAPI: {
       "to": ["brandon.west@sendgrid.com"],
       "category": "billing_notifications",
       "unique_args": {
          "user_id": "12345"
       },
       "sub": {
          "%amount%": ["$9.95"]
       }
     }
#SGDelivered
SMTP API
 Example: Billing notification (cont)




#SGDelivered
Metadata from Rails

 # Set headers for SendGrid.
 def add_sendgrid_headers(action, args)
   mailer = self.class.name
   args = Hash[ method(action).parameters.map(&:last).zip(args) ]
   headers "X-SMTPAPI" => {
     category:    [ mailer, "#{mailer}##{action}" ],
     unique_args: { environment: Rails.env, arguments: args.inspect }
   }.to_json
 end




#SGDelivered
Metadata from Rails
class ApplicationMailer < ActionMailer::Base
  # Call add_sendgrid_headers after generating each mail.
  def initialize(method_name=nil, *args)
    super.tap do
      add_sendgrid_headers(method_name, args) if method_name
    end
  end

  private

  # Set headers for SendGrid.
  def add_sendgrid_headers(action, args)
    mailer = self.class.name
    args = Hash[ method(action).parameters.map(&:last).zip(args) ]
    headers "X-SMTPAPI" => {
      category:    [ mailer, "#{mailer}##{action}" ],
      unique_args: { environment: Rails.env, arguments: args.inspect }
    }.to_json
  end
end

#SGDelivered
Rails Metadata




#SGDelivered
Customer Highlight
                      qup.tv




 Queue, rate, or watch movies on Netflix instant with
 one click!
#SGDelivered
Web API
   Send mail or manipulate SendGrid settings
   via HTTP

   Anything (almost) you can do from the




#SGDelivered
Web API
   Send mail or manipulate SendGrid settings
   via HTTP

   Anything (almost) you can do from the
     • Edit profile / account information




#SGDelivered
Web API
   Send mail or manipulate SendGrid settings
   via HTTP

   Anything (almost) you can do from the
     • Edit profile / account information
     • Add new Incoming Parse endpoints



#SGDelivered
Web API
   Send mail or manipulate SendGrid settings
   via HTTP

   Anything (almost) you can do from the
     • Edit profile / account information
     • Add new Incoming Parse endpoints
     • Retrieve stats


#SGDelivered
Web API
   Send mail or manipulate SendGrid settings
   via HTTP

   Anything (almost) you can do from the
     • Edit profile / account information
     • Add new Incoming Parse endpoints
     • Retrieve stats
     • Manage lists (Bounces, Blocks, Unsubscribes, etc.)

#SGDelivered
Web API
   Send mail or manipulate SendGrid settings
   via HTTP

   Anything (almost) you can do from the
     • Edit profile / account information
     • Add new Incoming Parse endpoints
     • Retrieve stats
     • Manage lists (Bounces, Blocks, Unsubscribes, etc.)
     • Add / Remove filters (apps)
#SGDelivered
Web API
   Web API endpoints have the following
       https://sendgrid.com/api/<MODULE>.<ACTION>.<FORMAT>




#SGDelivered
Web API
   Web API endpoints have the following
       https://sendgrid.com/api/<MODULE>.<ACTION>.<FORMAT>


   Example: Send Email over HTTP




#SGDelivered
Web API
   Web API endpoints have the following
       https://sendgrid.com/api/<MODULE>.<ACTION>.<FORMAT>


   Example: Send Email over HTTP
       curl    -X POST http://sendgrid.com/api/mail.send.json 
         -d    “to=john@example.com” 
         -d    “from=hello@myapp.com” 
         -d    “subject=hello world email” 
         -d    “text=some body text” 
         -d    “api_user=your_sendgrid_username” 
         -d    “api_key=your_sendgrid_key”



#SGDelivered
Web API vs. SMTP

  Q: Why would I use HTTP instead of SMTP?
   (Don’t worry, this is a really common question)




#SGDelivered
Web API vs. SMTP

  Q: Why would I use HTTP instead of SMTP?
   (Don’t worry, this is a really common question)


  A: Normally, you won’t have to. Unless...




#SGDelivered
Web API vs. SMTP

  Q: Why would I use HTTP instead of SMTP?
   (Don’t worry, this is a really common question)


  A: Normally, you won’t have to. Unless...
     • Your ISP is blocking common SMTP ports




#SGDelivered
Web API vs. SMTP

  Q: Why would I use HTTP instead of SMTP?
   (Don’t worry, this is a really common question)


  A: Normally, you won’t have to. Unless...
     • Your ISP is blocking common SMTP ports
     • There is high latency between your app and
     SendGrid


#SGDelivered
Web API vs. SMTP

  Q: Why would I use HTTP instead of SMTP?
   (Don’t worry, this is a really common question)


  A: Normally, you won’t have to. Unless...
     • Your ISP is blocking common SMTP ports
     • There is high latency between your app and
     SendGrid
     • Difficult to install / configure SMTP drivers
#SGDelivered
Web API vs. SMTP

  Q: Why would I use HTTP instead of SMTP?
   (Don’t worry, this is a really common question)


  A: Normally, you won’t have to. Unless...
     • Your ISP is blocking common SMTP ports
     • There is high latency between your app and
     SendGrid
     • Difficult to install / configure SMTP drivers
     • Simplicity for developers
#SGDelivered
Newsletter API
   Access the SendGrid newsletter app via the
   API
    https://sendgrid.com/api/newsletter/<ACTION>.<FORMAT>




     • Newsletter content
     • Recipient lists
     • Sender identities
     • Scheduled deliveries

#SGDelivered
Webhooks

  Q: What are Webhooks?




                 WEB
                HOOK


#SGDelivered
Webhooks

  Q: What are Webhooks?

  A: Webhooks are like inverse API calls;
  you tell us where the data needs to go,
  we send it there.

                   WEB
                  HOOK


#SGDelivered
Event Notification
  Receive notifications when SendGrid events happen


                    HTTP POST
                  (like a form submit)




#SGDelivered
Event Notification
  Receive notifications when SendGrid events happen


                            HTTP POST
                       (like a form submit)




               •Processed       •Opened
               •Dropped         •Clicked
               •Delivered       •Spam Reported
               •Bounced         •Unsubscribed



#SGDelivered
Event Notification

         What does an event notification look like?

           {
               "email":"john@example.com",
               "timestamp": 1322000095,
               "unique_arg":"some argument",
               "event":"delivered"
           }


#SGDelivered
Event Notification

  Q: Why would I want to use the event

  A: Use it to enhance your existing email
  functionality and gain smart customer
  insight. reactive API)
  (It’s a very




#SGDelivered
Inbound Parse

       Lets you receive email in your application


                  EMAIL              POST




#SGDelivered
Inbound Parse

       Lets you receive email in your application


                   EMAIL                POST




       1. User sends email to *@yourapplication.com
       2. SendGrid parses email & attachments
       3. SendGrid POSTs the email to your application

#SGDelivered
Customer Highlight
                 thebirdy.com




 Answer one email a day, and track what you spend.
 Create categories by tagging your purchases like
 #twitter. Super simple.
#SGDelivered
Inbound Parse

  1. Configure your hostname and URL settings

       http://sendgrid.com/developer/reply

  2. Point your domain’s MX records at SendGrid

          Type    Value
          MX      0 mx.sendgrid.net
  3. Return a 200 status code from your application


#SGDelivered
Additional APIs




#SGDelivered
Additional APIs

  Subuser API




#SGDelivered
Additional APIs

  Subuser API
   • Manage and control subuser accounts




#SGDelivered
Additional APIs

  Subuser API
   • Manage and control subuser accounts
  Reseller API




#SGDelivered
Additional APIs

  Subuser API
   • Manage and control subuser accounts
  Reseller API
   • For partners who want to integrate their platform with
   SendGrid




#SGDelivered
Additional APIs

  Subuser API
   • Manage and control subuser accounts
  Reseller API
   • For partners who want to integrate their platform with
   SendGrid
  Multiple Credentials API




#SGDelivered
Additional APIs

  Subuser API
   • Manage and control subuser accounts
  Reseller API
   • For partners who want to integrate their platform with
   SendGrid
  Multiple Credentials API
  • Add new API keys and users to your account



#SGDelivered
Demo Time!
               http://github.com/theycallmeswift




#SGDelivered
Questions?


#SGDelivered
Resources


 • Documentation/API Workshop:
   http://docs.sendgrid.com/

 • Official Libraries: https://github.com/
   sendgrid/
 • Support: http://support.sendgrid.com/


#SGDelivered
Thanks!
               @brandonmwest
               brandon.west@sendgrid.com




#SGDelivered

More Related Content

PPTX
ASP.NETからASP.NET Coreに移行した話
DOCX
Cs8494 software engineering
PDF
Git best practices workshop
PDF
Distance vector routing algorithm
PPT
Software process and project metrics
PPTX
Data Stream Management
PPTX
Mobile IP
ASP.NETからASP.NET Coreに移行した話
Cs8494 software engineering
Git best practices workshop
Distance vector routing algorithm
Software process and project metrics
Data Stream Management
Mobile IP

Viewers also liked (9)

PDF
Understand How Consumers Use Messaging
PDF
Twilio Signal 2016 Serverless Contact Center
PDF
Twilio Signal 2016 WebRTC Reborn
PDF
H2O World - What you need before doing predictive analysis - Keen.io
PDF
Twilio Contact Center Overview
PDF
Twilio Signal 2016 Technical Blogging
PDF
Twilio Signal 2016 Using Add-ons
PDF
Why Mobile Messaging Works?
PDF
What Can You Do With Twilio
Understand How Consumers Use Messaging
Twilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 WebRTC Reborn
H2O World - What you need before doing predictive analysis - Keen.io
Twilio Contact Center Overview
Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Using Add-ons
Why Mobile Messaging Works?
What Can You Do With Twilio
Ad

Similar to SendGrid Delivered API Workshop (20)

PDF
SendGridDelivered_API_Workshop
PPTX
AWS Summit Barcelona 2015 - Introducing Amazon API Gateway
PPTX
Building a scalable API with Grails
PDF
Aws Technical Day 2015 - Amazon API Gateway
PDF
Lambdaless and AWS CDK
PDF
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
PPTX
Ai lifecycle and navigator
PDF
API Design Workflows
PDF
Serverless — it all started in Vegas
PPTX
REST API Best Practices & Implementing in Codeigniter
PPTX
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
PPT
CGI Presentation
PDF
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
PDF
Developing Brilliant and Powerful APIs in Ruby & Python
PPTX
Swagger APIs for Humans and Robots (Gluecon)
PDF
Frontend APIs powering fast paced product iterations
PPTX
Azure Functions Real World Examples
PPTX
Lessons learned on the Azure API Stewardship Journey.pptx
PDF
PDF
I Love APIs Europe 2015: Developer Sessions
SendGridDelivered_API_Workshop
AWS Summit Barcelona 2015 - Introducing Amazon API Gateway
Building a scalable API with Grails
Aws Technical Day 2015 - Amazon API Gateway
Lambdaless and AWS CDK
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Ai lifecycle and navigator
API Design Workflows
Serverless — it all started in Vegas
REST API Best Practices & Implementing in Codeigniter
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
CGI Presentation
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
Developing Brilliant and Powerful APIs in Ruby & Python
Swagger APIs for Humans and Robots (Gluecon)
Frontend APIs powering fast paced product iterations
Azure Functions Real World Examples
Lessons learned on the Azure API Stewardship Journey.pptx
I Love APIs Europe 2015: Developer Sessions
Ad

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Encapsulation theory and applications.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Cloud computing and distributed systems.
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
The Rise and Fall of 3GPP – Time for a Sabbatical?
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
A Presentation on Artificial Intelligence
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Encapsulation theory and applications.pdf
Chapter 3 Spatial Domain Image Processing.pdf
cuic standard and advanced reporting.pdf
Spectral efficient network and resource selection model in 5G networks
Cloud computing and distributed systems.
Unlocking AI with Model Context Protocol (MCP)
Advanced methodologies resolving dimensionality complications for autism neur...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Big Data Technologies - Introduction.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
MYSQL Presentation for SQL database connectivity
Review of recent advances in non-invasive hemoglobin estimation
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...

SendGrid Delivered API Workshop

  • 2. Hi, I’m Brandon. @brandonmwest brandon.west@sendgrid.com #SGDelivered
  • 4. What is SendGrid? • Cloud-based SMTP provider #SGDelivered
  • 5. What is SendGrid? • Cloud-based SMTP provider • Massively scalable #SGDelivered
  • 6. What is SendGrid? • Cloud-based SMTP provider • Massively scalable • Analytics on emails you send #SGDelivered
  • 7. What is SendGrid? • Cloud-based SMTP provider • Massively scalable • Analytics on emails you send • Robust APIs for developers to integrate #SGDelivered
  • 9. If you learn 1 thing... SendGrid > Email Relay #SGDelivered
  • 10. APIs Overview Q: Why should I care about the SendGrid APIs? #SGDelivered
  • 11. APIs Overview Q: Why should I care about the SendGrid APIs? A: There are a lot of reasons, but the #SGDelivered
  • 12. APIs Overview Q: Why should I care about the SendGrid APIs? A: There are a lot of reasons, but the • Reduce code complexity #SGDelivered
  • 13. APIs Overview Q: Why should I care about the SendGrid APIs? A: There are a lot of reasons, but the • Reduce code complexity • Deeper analytics & tracking #SGDelivered
  • 14. APIs Overview Q: Why should I care about the SendGrid APIs? A: There are a lot of reasons, but the • Reduce code complexity • Deeper analytics & tracking • Less resource consumption #SGDelivered
  • 15. APIs Overview Q: Why should I care about the SendGrid APIs? A: There are a lot of reasons, but the • Reduce code complexity • Deeper analytics & tracking • Less resource consumption • Better UX #SGDelivered
  • 16. Why Use SendGrid? Time is valuable. Especially developer time. #SGDelivered
  • 17. APIs Overview What APIs does SendGrid Offer? API #SGDelivered
  • 18. APIs Overview What APIs does SendGrid Offer? • SMTP API API #SGDelivered
  • 19. APIs Overview What APIs does SendGrid Offer? • SMTP API • Web API API #SGDelivered
  • 20. APIs Overview What APIs does SendGrid Offer? • SMTP API • Web API • Newsletter API API #SGDelivered
  • 21. APIs Overview What APIs does SendGrid Offer? • SMTP API • Web API • Newsletter API • Reseller API API #SGDelivered
  • 22. APIs Overview What APIs does SendGrid Offer? • SMTP API • Subuser API • Web API • Newsletter API • Reseller API API #SGDelivered
  • 23. APIs Overview What APIs does SendGrid Offer? • SMTP API • Subuser API • Web API • Credentials API • Newsletter API • Reseller API API #SGDelivered
  • 24. APIs Overview What APIs does SendGrid Offer? • SMTP API • Subuser API • Web API • Credentials API • Newsletter API • Event Webhook • Reseller API API #SGDelivered
  • 25. APIs Overview What APIs does SendGrid Offer? • SMTP API • Subuser API • Web API • Credentials API • Newsletter API • Event Webhook • Reseller API • Inbound Parse Webhook API #SGDelivered
  • 26. SMTP API Custom SMTP header that contains instructions on how to process your email X-SMTPAPI: { ... } Add extra information, filters, & manipulations: #SGDelivered
  • 27. SMTP API Custom SMTP header that contains instructions on how to process your email X-SMTPAPI: { ... } Add extra information, filters, & manipulations: • Define multiple recipients #SGDelivered
  • 28. SMTP API Custom SMTP header that contains instructions on how to process your email X-SMTPAPI: { ... } Add extra information, filters, & manipulations: • Define multiple recipients • Text Substitutions #SGDelivered
  • 29. SMTP API Custom SMTP header that contains instructions on how to process your email X-SMTPAPI: { ... } Add extra information, filters, & manipulations: • Define multiple recipients • Text Substitutions • Categories #SGDelivered
  • 30. SMTP API Custom SMTP header that contains instructions on how to process your email X-SMTPAPI: { ... } Add extra information, filters, & manipulations: • Define multiple recipients • Text Substitutions • Categories • Unique arguments / Identifiers #SGDelivered
  • 31. SMTP API Example: Billing notification X-SMTPAPI: { "to": ["brandon.west@sendgrid.com"], "category": "billing_notifications", "unique_args": { "user_id": "12345" }, "sub": { "%amount%": ["$9.95"] } } #SGDelivered
  • 32. SMTP API Example: Billing notification (cont) #SGDelivered
  • 33. Metadata from Rails # Set headers for SendGrid. def add_sendgrid_headers(action, args) mailer = self.class.name args = Hash[ method(action).parameters.map(&:last).zip(args) ] headers "X-SMTPAPI" => { category: [ mailer, "#{mailer}##{action}" ], unique_args: { environment: Rails.env, arguments: args.inspect } }.to_json end #SGDelivered
  • 34. Metadata from Rails class ApplicationMailer < ActionMailer::Base # Call add_sendgrid_headers after generating each mail. def initialize(method_name=nil, *args) super.tap do add_sendgrid_headers(method_name, args) if method_name end end private # Set headers for SendGrid. def add_sendgrid_headers(action, args) mailer = self.class.name args = Hash[ method(action).parameters.map(&:last).zip(args) ] headers "X-SMTPAPI" => { category: [ mailer, "#{mailer}##{action}" ], unique_args: { environment: Rails.env, arguments: args.inspect } }.to_json end end #SGDelivered
  • 36. Customer Highlight qup.tv Queue, rate, or watch movies on Netflix instant with one click! #SGDelivered
  • 37. Web API Send mail or manipulate SendGrid settings via HTTP Anything (almost) you can do from the #SGDelivered
  • 38. Web API Send mail or manipulate SendGrid settings via HTTP Anything (almost) you can do from the • Edit profile / account information #SGDelivered
  • 39. Web API Send mail or manipulate SendGrid settings via HTTP Anything (almost) you can do from the • Edit profile / account information • Add new Incoming Parse endpoints #SGDelivered
  • 40. Web API Send mail or manipulate SendGrid settings via HTTP Anything (almost) you can do from the • Edit profile / account information • Add new Incoming Parse endpoints • Retrieve stats #SGDelivered
  • 41. Web API Send mail or manipulate SendGrid settings via HTTP Anything (almost) you can do from the • Edit profile / account information • Add new Incoming Parse endpoints • Retrieve stats • Manage lists (Bounces, Blocks, Unsubscribes, etc.) #SGDelivered
  • 42. Web API Send mail or manipulate SendGrid settings via HTTP Anything (almost) you can do from the • Edit profile / account information • Add new Incoming Parse endpoints • Retrieve stats • Manage lists (Bounces, Blocks, Unsubscribes, etc.) • Add / Remove filters (apps) #SGDelivered
  • 43. Web API Web API endpoints have the following https://sendgrid.com/api/<MODULE>.<ACTION>.<FORMAT> #SGDelivered
  • 44. Web API Web API endpoints have the following https://sendgrid.com/api/<MODULE>.<ACTION>.<FORMAT> Example: Send Email over HTTP #SGDelivered
  • 45. Web API Web API endpoints have the following https://sendgrid.com/api/<MODULE>.<ACTION>.<FORMAT> Example: Send Email over HTTP curl -X POST http://sendgrid.com/api/mail.send.json -d “to=john@example.com” -d “from=hello@myapp.com” -d “subject=hello world email” -d “text=some body text” -d “api_user=your_sendgrid_username” -d “api_key=your_sendgrid_key” #SGDelivered
  • 46. Web API vs. SMTP Q: Why would I use HTTP instead of SMTP? (Don’t worry, this is a really common question) #SGDelivered
  • 47. Web API vs. SMTP Q: Why would I use HTTP instead of SMTP? (Don’t worry, this is a really common question) A: Normally, you won’t have to. Unless... #SGDelivered
  • 48. Web API vs. SMTP Q: Why would I use HTTP instead of SMTP? (Don’t worry, this is a really common question) A: Normally, you won’t have to. Unless... • Your ISP is blocking common SMTP ports #SGDelivered
  • 49. Web API vs. SMTP Q: Why would I use HTTP instead of SMTP? (Don’t worry, this is a really common question) A: Normally, you won’t have to. Unless... • Your ISP is blocking common SMTP ports • There is high latency between your app and SendGrid #SGDelivered
  • 50. Web API vs. SMTP Q: Why would I use HTTP instead of SMTP? (Don’t worry, this is a really common question) A: Normally, you won’t have to. Unless... • Your ISP is blocking common SMTP ports • There is high latency between your app and SendGrid • Difficult to install / configure SMTP drivers #SGDelivered
  • 51. Web API vs. SMTP Q: Why would I use HTTP instead of SMTP? (Don’t worry, this is a really common question) A: Normally, you won’t have to. Unless... • Your ISP is blocking common SMTP ports • There is high latency between your app and SendGrid • Difficult to install / configure SMTP drivers • Simplicity for developers #SGDelivered
  • 52. Newsletter API Access the SendGrid newsletter app via the API https://sendgrid.com/api/newsletter/<ACTION>.<FORMAT> • Newsletter content • Recipient lists • Sender identities • Scheduled deliveries #SGDelivered
  • 53. Webhooks Q: What are Webhooks? WEB HOOK #SGDelivered
  • 54. Webhooks Q: What are Webhooks? A: Webhooks are like inverse API calls; you tell us where the data needs to go, we send it there. WEB HOOK #SGDelivered
  • 55. Event Notification Receive notifications when SendGrid events happen HTTP POST (like a form submit) #SGDelivered
  • 56. Event Notification Receive notifications when SendGrid events happen HTTP POST (like a form submit) •Processed •Opened •Dropped •Clicked •Delivered •Spam Reported •Bounced •Unsubscribed #SGDelivered
  • 57. Event Notification What does an event notification look like? { "email":"john@example.com", "timestamp": 1322000095, "unique_arg":"some argument", "event":"delivered" } #SGDelivered
  • 58. Event Notification Q: Why would I want to use the event A: Use it to enhance your existing email functionality and gain smart customer insight. reactive API) (It’s a very #SGDelivered
  • 59. Inbound Parse Lets you receive email in your application EMAIL POST #SGDelivered
  • 60. Inbound Parse Lets you receive email in your application EMAIL POST 1. User sends email to *@yourapplication.com 2. SendGrid parses email & attachments 3. SendGrid POSTs the email to your application #SGDelivered
  • 61. Customer Highlight thebirdy.com Answer one email a day, and track what you spend. Create categories by tagging your purchases like #twitter. Super simple. #SGDelivered
  • 62. Inbound Parse 1. Configure your hostname and URL settings http://sendgrid.com/developer/reply 2. Point your domain’s MX records at SendGrid Type Value MX 0 mx.sendgrid.net 3. Return a 200 status code from your application #SGDelivered
  • 64. Additional APIs Subuser API #SGDelivered
  • 65. Additional APIs Subuser API • Manage and control subuser accounts #SGDelivered
  • 66. Additional APIs Subuser API • Manage and control subuser accounts Reseller API #SGDelivered
  • 67. Additional APIs Subuser API • Manage and control subuser accounts Reseller API • For partners who want to integrate their platform with SendGrid #SGDelivered
  • 68. Additional APIs Subuser API • Manage and control subuser accounts Reseller API • For partners who want to integrate their platform with SendGrid Multiple Credentials API #SGDelivered
  • 69. Additional APIs Subuser API • Manage and control subuser accounts Reseller API • For partners who want to integrate their platform with SendGrid Multiple Credentials API • Add new API keys and users to your account #SGDelivered
  • 70. Demo Time! http://github.com/theycallmeswift #SGDelivered
  • 72. Resources • Documentation/API Workshop: http://docs.sendgrid.com/ • Official Libraries: https://github.com/ sendgrid/ • Support: http://support.sendgrid.com/ #SGDelivered
  • 73. Thanks! @brandonmwest brandon.west@sendgrid.com #SGDelivered

Editor's Notes

  • #2: \n
  • #3: \n
  • #4: Scalable: thousands of emails per second, hundreds of millions per day, billions per month\n
  • #5: Scalable: thousands of emails per second, hundreds of millions per day, billions per month\n
  • #6: Scalable: thousands of emails per second, hundreds of millions per day, billions per month\n
  • #7: Scalable: thousands of emails per second, hundreds of millions per day, billions per month\n
  • #8: Install a gem called pony\nset some defaults\nconstruct a message and send it\ncheck that the email arrived\n
  • #9: \n
  • #10: - less logic in your code that triggers mailers\n - Events, stats, real-time\n - Scheduling and multiple recipients reduce need for worker\n - Respond to messages from inbox\n
  • #11: - less logic in your code that triggers mailers\n - Events, stats, real-time\n - Scheduling and multiple recipients reduce need for worker\n - Respond to messages from inbox\n
  • #12: - less logic in your code that triggers mailers\n - Events, stats, real-time\n - Scheduling and multiple recipients reduce need for worker\n - Respond to messages from inbox\n
  • #13: - less logic in your code that triggers mailers\n - Events, stats, real-time\n - Scheduling and multiple recipients reduce need for worker\n - Respond to messages from inbox\n
  • #14: - less logic in your code that triggers mailers\n - Events, stats, real-time\n - Scheduling and multiple recipients reduce need for worker\n - Respond to messages from inbox\n
  • #15: Story about how/why the company was founded\nDevelopers are doers, so if they need to send email, they&amp;#x2019;re likely to fall down an email configuration rabbit hole and disappear\n
  • #16: \n
  • #17: \n
  • #18: \n
  • #19: \n
  • #20: \n
  • #21: \n
  • #22: \n
  • #23: \n
  • #24: \n
  • #25: \n
  • #26: \n
  • #27: \n
  • #28: \n
  • #29: \n
  • #30: \n
  • #31: \n
  • #32: These categories and arguments are also passed as part of our event webhook, so it&amp;#x2019;s pretty easy to create a local archive of all mail events.\n
  • #33: From Hack the Midwest, Kansas City, June 2012.\n
  • #34: Apps example -- for password resets, bypass list management\n
  • #35: Apps example -- for password resets, bypass list management\n
  • #36: Apps example -- for password resets, bypass list management\n
  • #37: Apps example -- for password resets, bypass list management\n
  • #38: Apps example -- for password resets, bypass list management\n
  • #39: \n
  • #40: \n
  • #41: - Best setup is to set up a local mail server that queues up messages and then relays through SendGrid\n - Handing your email off to fault tolerant machines\n - Graceful queuing and resending\n - Connection reuse and pipelining\n
  • #42: - Best setup is to set up a local mail server that queues up messages and then relays through SendGrid\n - Handing your email off to fault tolerant machines\n - Graceful queuing and resending\n - Connection reuse and pipelining\n
  • #43: - Best setup is to set up a local mail server that queues up messages and then relays through SendGrid\n - Handing your email off to fault tolerant machines\n - Graceful queuing and resending\n - Connection reuse and pipelining\n
  • #44: - Best setup is to set up a local mail server that queues up messages and then relays through SendGrid\n - Handing your email off to fault tolerant machines\n - Graceful queuing and resending\n - Connection reuse and pipelining\n
  • #45: - Best setup is to set up a local mail server that queues up messages and then relays through SendGrid\n - Handing your email off to fault tolerant machines\n - Graceful queuing and resending\n - Connection reuse and pipelining\n
  • #46: \n
  • #47: \n
  • #48: Limits of the &amp;#x201C;spam report&amp;#x201D; events - not all providers, such as gmail, let us listen to that feedback loop.\nLimits of &amp;#x201C;open tracking&amp;#x201D; - requires an image to be displayed.\n
  • #49: \n
  • #50: - Job application example\n- React to bounces on the fly\n- Analyze user behavior and optimize\n- Red alerts\n
  • #51: Possible use cases:\n - Respond to discussions\n - Upload file attachments\n - Post blog articles\n
  • #52: \n
  • #53: \n
  • #54: Subuser use case - Someone that wants to manage their clients individually for stats, etc\nReseller use case - Windows Azure, Heroku, etc\nMultiple Credentials use case - EVERYONE should use this.\n
  • #55: Subuser use case - Someone that wants to manage their clients individually for stats, etc\nReseller use case - Windows Azure, Heroku, etc\nMultiple Credentials use case - EVERYONE should use this.\n
  • #56: Subuser use case - Someone that wants to manage their clients individually for stats, etc\nReseller use case - Windows Azure, Heroku, etc\nMultiple Credentials use case - EVERYONE should use this.\n
  • #57: Subuser use case - Someone that wants to manage their clients individually for stats, etc\nReseller use case - Windows Azure, Heroku, etc\nMultiple Credentials use case - EVERYONE should use this.\n
  • #58: Subuser use case - Someone that wants to manage their clients individually for stats, etc\nReseller use case - Windows Azure, Heroku, etc\nMultiple Credentials use case - EVERYONE should use this.\n
  • #59: Subuser use case - Someone that wants to manage their clients individually for stats, etc\nReseller use case - Windows Azure, Heroku, etc\nMultiple Credentials use case - EVERYONE should use this.\n
  • #60: API Workshop demo\nSwift&amp;#x2019;s Playlist Demo\n
  • #61: \n
  • #62: \n
  • #63: \n