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
8.
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
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
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
Scalable: thousands of emails per second, hundreds of millions per day, billions per month\n
Scalable: thousands of emails per second, hundreds of millions per day, billions per month\n
Scalable: thousands of emails per second, hundreds of millions per day, billions per month\n
Scalable: thousands of emails per second, hundreds of millions per day, billions per month\n
Install a gem called pony\nset some defaults\nconstruct a message and send it\ncheck that the email arrived\n
\n
- 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
- 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
- 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
- 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
- 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
Story about how/why the company was founded\nDevelopers are doers, so if they need to send email, they&#x2019;re likely to fall down an email configuration rabbit hole and disappear\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
These categories and arguments are also passed as part of our event webhook, so it&#x2019;s pretty easy to create a local archive of all mail events.\n
From Hack the Midwest, Kansas City, June 2012.\n
Apps example -- for password resets, bypass list management\n
Apps example -- for password resets, bypass list management\n
Apps example -- for password resets, bypass list management\n
Apps example -- for password resets, bypass list management\n
Apps example -- for password resets, bypass list management\n
\n
\n
- 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
- 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
- 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
- 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
- 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
\n
\n
Limits of the &#x201C;spam report&#x201D; events - not all providers, such as gmail, let us listen to that feedback loop.\nLimits of &#x201C;open tracking&#x201D; - requires an image to be displayed.\n
\n
- Job application example\n- React to bounces on the fly\n- Analyze user behavior and optimize\n- Red alerts\n
Possible use cases:\n - Respond to discussions\n - Upload file attachments\n - Post blog articles\n
\n
\n
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
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
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
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
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
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
API Workshop demo\nSwift&#x2019;s Playlist Demo\n