Articles by Elmer Thomas

Elmer Thomas is SendGrid's Developer Experience Engineer. His mission is to help SendGrid live up to its slogan: "Email Delivery. Simplified" by improving the lives of developers, both internally and externally. Via all sorts of hackery, of course. Follow his exploits on Twitter and GitHub.

Follow Elmer

How We Use to Test 233 API Endpoints in Seconds

Product, Technical
testing API endpoints
SendGrid actively supports SDKs across 7 programming languages, with each of these SDKs supporting 233 API calls. We needed a way to test each endpoint, ensuring we don’t break basic usability while rapidly evolving our code base to support all of our new v3 APIs, without creating custom mocking code in each testing framework. made this extremely easy with its Prism mock server, giving us a Swagger/OAI-driven mocked version of the SendGrid API server. In this post, we will describe the specific workflows that allow us to test all of our endpoint interfaces in seconds rather than minutes. Read More ›

Using PHP to Implement a Fluent Interface to Any REST API

As we upgrade our open source SendGrid API libraries to support our v3 Web API, we've also been updating our API client libraries to contain as few dependencies as possible. Part of this effort entails creating brand new, lean HTTP clients to drive communication with our APIs. In this post, we'll explore our new PHP HTTP client that will drive our new v5 SendGrid PHP library, using a working prototype. Read More ›

Using Python to Implement a Fluent Interface to Any REST API


In this post, I will demonstrate the techniques used to create our newly open sourced Python HTTP Client, that drives our SendGrid Python library, using a working prototype. The remainder of this post will reference the following code: Fluent Interfaces A fluent interface allows us to create API calls dynamically, without pre-defining all the endpoints. For example, we can use `` for a call to: `GET /path/to/the/endpoint` without defining methods for `path`, `to`, `the`, and `endpoint`. Method Chaining To chain our method calls together, in general, we simply return `self`. However, in this case we are returning a new version of the `Fluent` object, because we want to preserve fragments of the url for later reuse see line 8. Reflection Read More ›

Open Source Library Data Collector

open source

If you are supporting and maintaining public facing code, gathering data regarding the usage of that code can help with planning future improvements by highlighting priorities, and reporting the return on investment (ROI) of your projects. You will find the software described in this post especially useful if your code is hosted on GitHub and you use package managers for distribution. It will allow you to gather valuable and informative data that can help drive future improvements, and save you time. Using the Data At SendGrid, we maintain open source libraries across 7 programming languages. Using the data collected from this tool combined with internal metrics (such as the number of API calls through a given library) allows us to Read More ›

OneNote and SendGrid’s Event Webhook


SendGrid will let you know, in near real-time, when emails fail to reach your customers. But what do you do after you have that information? Do you have a plan? With this simple app, you can automatically create follow-up actions in Microsoft OneNote, right as email failures occur. In this blog post, I show you how to use Flask (A Python Microframework), hosted on Microsoft Azure, to capture messages regarding email failures sent from the SendGrid Event Webhook. We then create OneNote pages, that contain follow-up actions, based on the particular email failure. Prerequisites This code was developed using Microsoft Visual Studio Express 2013 for Web within VMWare Fusion 6.0.4, running Microsoft Windows Technical Preview on top of Mac OSX Read More ›

Visit SendGrid at DataWeek + API World 2014 Conference & Expo

apiworld2014 logo

Next week, on September 16th, 9am at DataWeek + API World 2014 in San Francisco, I’ll be presenting a talk, titled “Quantify Thyself, then Go Forth and Conquer with a Personal Life API.” A couple months ago, I wrote a blog about creating a personal API to analyze data from your personal life to make real-time decisions or perform long-term planning. The post covered what data to quantify, how to automagically gather that data, and the tools for creating a Personal Life API. My goal with this presentation is for the audience to walk away with the knowledge and tools to build their own personal API. We’ll play with Python/Flask and in the process. DataWeek + API World 2014 Conference & Read More ›

Tracking Email Using Microsoft Azure and the SendGrid Event Webhook (Part 2)

Tracking Email example

Welcome back to the second part of my series about building a Windows Phone 8.1 app to track email powered by Microsoft Azure and SendGrid’s Event Webhook. If you haven’t read part one in this series, please do so before continuing. Recap In part one, we implemented the SendGrid Event Webhook listener using C# ASP.NET hosted on Microsoft Azure. In this post (part two), we will create a Windows Phone 8.1 app that displays email tracking data via the SendGrid Web API. In part three of this series, we will send push notifications from our SendGrid Event Webhook listener when certain events, such as a bounce, occur and display the details within the app. Prerequisites/Assumptions The code for this post Read More ›