How to Run SparkPost in Postman

Steve Tuck
Apr. 8, 2016 by Steve Tuck


In case you missed the announcement last month, our SparkPost API documentation now comes with a “Run in Postman” button:


What Does That Mean?

Cool! We’ve got a nifty new button. But what does that mean? And how do I know whether or not I’ll need (or want) it?
Here are the basics:

  • Are you (or one of your other developers) digging into the SparkPost API yourself, in addition to using the automated systems built around it?
  • Are you a little uncomfortable with the details of HTTP requests?
  • Do you have a hard time remembering what particular cURL command to use?

Postman to the rescue! It parses your API request and response and displays them in more manageable formats. It also simplifies the creation of API requests, which means you’re off the hook for finding the arcane syntax that will pull the precise information you’re in search of.

As Dave mentions in his blog post:

Postman gives less-technical users a way to make arbitrary HTTP requests using a point and click user interface. Collections make it easy to organize your requests and, to a point, share them. Environments make it easy to switch authentication keys and make other things configurable without editing each request.

Is your interest piqued? Good! Then without further ado, let’s dive in…

Getting Started

So what do you need to do to start using this?

Firstly, when you click this button, you’ll be directed to open this collection with your installed Postman app.

You will then see the “SparkPost API” collection show up in the left-side pane, and you can expand the various folders in the collection.


There are currently 76 different request types in the collection; we’ll be adding more as the API becomes even richer.

You can try running these right away – for example Message Events / Get Samples.  You’ll see results come right back in the Response window.


This particular request works straight away, because just getting samples back doesn’t require authorization.

Setting up Authorization

If you try most of the other requests – such as “List All Sending Domains” – you’ll get a message saying

because each account’s data is private. You’ll need an API key set up to access this information.


Here’s where a neat feature of Postman comes in. The Environments collection is set up to look for a Postman variable called {{API_KEY}}.  You can see this by viewing the request headers.


If you don’t have an API key yet, you’ll want to create one.

Once you have your API key in hand, go to “Manage Environments.”


Choose Add, and type a name, e.g. “My SparkPost setup.”  Then add your key and value.

Key should be just the words API_KEY  (without the curly braces this time), and the value is your specific hex string.


Hit Add.  Choose “My SparkPost Setup” from your drop-down list of environments in Postman.


Re-run your API request, and your authorization will be used for each of the collection’s requests without any further editing.

Here’s what I get back from “List all Sending Domains” — I can see my domain is set up and ready to go.


Now you’re set to explore the other requests in this collection.  Happy exploring!

Related Content

3 Strategies for Your Next Financial Services Reengagement Campaign

Discover three great marketing strategies that you should consider when building your next financial services reengagement campaign.

read more

Introducing Our New Recipient Validation Beta Feature

SparkPost’s new beta feature, Recipient Validation, is an easy, efficient way to verify that addresses are valid before you send.

read more

Iterable Shares What Cross-Channel Engagement Means in 2018

Discover some of the marketing insights outlined in Iterable's recently released 2018 Cross-Channel Engagement Benchmark Report.

read more

Get started and start sending

Try SparkPost and see how easy it is to deliver your app’s email on time and to the inbox.

Try Free

Send this to a friend