The SendGrid Event Webhook sends email event data as SendGrid processes it. This means you can receive data in nearly real-time, making it ideal to integrate with logging or monitoring systems.
Because the Event Webhook delivers data to your systems, it is also well-suited to backing up and storing event data within your infrastructure to meet your own data access and retention needs.
You can think about the types of events provided by the Event Webhook in two categories: deliverability events and engagement events.
Both types of events are important and should be monitored to understand the overall health of your email program. The Webhooks API allows you to configure your Event Webhook configurations.
Currently, data staged to be be posted through the webhooks is stored in the US.
This endpoint allows you to retrieve the statistics for your Parse Webhook usage.
SendGrid's Inbound Parse Webhook allows you to parse the contents and attachments of incoming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments.
There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the Library Index.
Bearer <<YOUR_API_KEY_HERE>>
Optional
The on-behalf-of
header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be "account-id" followed by the customer account's ID (e.g., on-behalf-of: account-id <account-id>
). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., on-behalf-of: <subuser-username>
). See On Behalf Of for more information.
Optional
The number of statistics to return on each page.
Optional
The number of statistics to skip.
Optional
How you would like the statistics to by grouped.
day
week
month
The starting date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD
Optional
The end date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD
The day the request is made.
Array of:
The date that the stats were collected.
The Parse Webhook usage statistics.
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const queryParams = {5start_date: "2010-01-22",6end_date: "The day the request is made.",7};89const request = {10url: `/v3/user/webhooks/parse/stats`,11method: "GET",12qs: queryParams,13};1415client16.request(request)17.then(([response, body]) => {18console.log(response.statusCode);19console.log(response.body);20})21.catch((error) => {22console.error(error);23});