Templates · Email
SendGrid Mail API collection template
Send email, manage contacts and check bounces with the SendGrid v3 API.
What's inside
Send a transactional email with the SendGrid v3 Mail Send API, add a marketing contact, and look at bounces and API key scopes.
4 requests in 2 folders · Base URL https://api.sendgrid.com/v3 · Bearer token
Set it up
- Open SendGrid Mail API in Requestarium (or in the app: Import, Start from a template) and import it. You get the collection and a "SendGrid Mail API" environment.
- Create an API key with Mail Send access in SendGrid, Settings, API Keys, and verify the sender address you put in fromEmail.
- Fill in the environment, pick it in the environment menu and send the first request.
Environment variables
| Variable | What it is |
|---|---|
sendgridApiKeysecret | API key, SG.… |
fromEmail | A verified sender address. |
toEmail | Recipient address. |
Requests
- POSTSend an email
/mail/sendAnswers 202 Accepted with an empty body.
- GETList bounces
/suppression/bouncesAddresses that bounced.
Contacts and keys
- PUTAdd or update a contact
/marketing/contactsUpserts a marketing contact; runs as a background job.
- GETAPI key scopes
/scopesWhat the key is allowed to do; a quick way to check it.