Developers use an array of different applications, code libraries, and methodologies to build out SendGrid integrations for various types of email. These include transactional order confirmations, password reset and identity emails, and promotional newsletters that drive sales or introduce new products or services.
During the development process, an API call can provide a sanity check to decide if an issue lies within the code base, formatting, or method of hitting the SendGrid v3 API.
Having an intuitive tool that has quickly accessible libraries of all available API calls can drastically cut down on the time it takes to come to a conclusion.
Many developers rely on Postman to do just this. 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.
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.
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 to pull information from a subuser account.
To authorize using your SendGrid API key:
‘KEY’ = Authorization
‘VALUE’ = Bearer [yourAPIKeyHere]
To make a call on behalf of a subuser:
‘KEY’ = on-behalf-of
‘VALUE’ = [subuserNameHere]
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 GET stats for the subuser specified.
At SendGrid we’re all about making our senders’ 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, and 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. To see how SendGrid can help you, check out our sending plans.