Sign up for a SparkPost account and visit our Developer Hub for even more content.
Postman Collection demonstrating how to use the SparkPost REST API. More information about the API can be found on developers.sparkpost.com/api.
To use the latest published version, click the following button to import the SparkPost API as a collection:
You can also download the collection file from this repo, then import directly into Postman.
- Postman The collection is for use by the Postman app. Postman is a utility that allows you to quickly test and use REST APIs. More information can be found at getpostman.com.
- SparkPost API key To use our API, you must have an API key with permissions enabled for which resource you want to use. For instance, for the Metrics endpoints, your API key must have the "Metrics: Read-only" permission.
The collection is arranged in folders according to the API endpoints.
Almost all requests require a valid SparkPost API key. The collection requests have a placeholder variable called API_KEY
for this.
This should be set in your Postman environment i.e. outside the collection itself. This should help avoid accidental commits of API keys to repos.
A collection-scope variable BASE_URL
points to the usual host https://api.sparkpost.com
.
SparkPost Enterprise customers and SparkPost EU customers can override this in your Postman environment to point to the appropriate host.
For instance, if you are a SparkPost EU customer, you set the Postman environment variable BASE_URL
to https://api.eu.sparkpost.com
.
More information on managing Postman environments and variables can be found here.
Variable | Default value | Set in | May override in | Example |
---|---|---|---|---|
API_KEY |
- | Environment | - | - |
BASE_URL |
https://api.sparkpost.com |
Collection | Environment | https://api.eu.sparkpost.com |
We welcome your contributions! See CONTRIBUTING.md for details on how to help out.