Developers use a wide array of different applications, code libraries, and methodologies to build out their SendGrid integrations for sending all types of mail related to their businesses. From transactional type order confirmations, password resets and identity emails to promotional newsletters to drive sales or introduce new products or services.

During the development process, many times a sanity check or simple API call is needed to decide if an issue lies within code base, formatting, or method of hitting the SendGrid v3 API. Having an intuitive tool with quickly accessible libraries of all available API calls can drastically cut down on the time it takes to come to a conclusion.

Postman is a widely used API tool helping 5 million developers and more than 100,000 companies access 130 million APIs every month. Postman provides features for designing, testing, mocking and debugging API requests to make API development easier for everyone.

If you aren’t using Postman yet you can download it here for Mac, Windows, or Linux. Once you have it installed – or if you already have it – you can download the SendGrid v3 API Postman Collection using the button below.

Once downloaded, you should see the SendGrid v3 API Documentation folder on the left-hand side of the Postman application under the Collections tab.

API Keys

If you haven’t already generated a SendGrid API key log into your dashboard here. Once logged in, click Settings on the left-hand navigation and then click API Keys.

Postman Configuration

Choose an endpoint you would like to use from the Postman Collection panel on the left side of the application.

A couple of headers will be needed before you make a call to an API endpoint. ‘Authorization’ is required and will contain your SendGrid API key. ‘On-behalf-of’ is optional and allows for using a parent API key but to pull information from a sub-user account.

To authorize using your SendGrid API key:

‘KEY’ = Authorization

‘VALUE’ = Bearer [yourAPIKeyHere]

To make a call on behalf of a sub-user

‘KEY’ = on-behalf-of

‘VALUE’ = [subuserNameHere]

Endpoint Parameters

Some endpoints will have configurable parameters to set limits, offsets, start and end dates, etc. These can be configured under the ‘Params’ section below the URL.

The GIF below shows a request to the global stats endpoint using Start and End Date parameters. It also uses the Authorization and ‘on-behalf-of’ headers to use the parent API key but GET stats for the sub-user specified.

GIF showing Postman call:

Takeaways

At SendGrid we’re all about making our jobs and lives easier and more efficient. SendGrid’s Postman collection can help you and your team accomplish just that. This collection will arm you with the start you need to build out your tests, mockups, and automations.

Combine this with SendGrid’s award-winning API, reliability, and world-class products and professional services – we believe you can focus more on how email can help your business grow, and spend less time-solving API problems related to your email program.



Colin Sharpe
As a Solutions Architect at SendGrid, Colin helps customers integrate their apps and websites with SendGrid's platform while coaching best practices for account setup and success. When not sending email, he's sending it on his mountain bike and snowboard in the Rocky Mountains.