Skip to contentSkip to navigationSkip to topbar
On this page

Retrieves Inbound Parse Webhook statistics.



API Overview

api-overview page anchor

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.

  • Deliverability events such as "delivered," "bounced," and "processed" help you understand if your email is being delivered to your customers.
  • Engagement events such as "open," and "click" help you understand if customers are reading and interacting with your emails after they arrive.

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.


GET/v3/user/webhooks/parse/stats

Base url: https://api.sendgrid.com (for global users and subusers)

Base url: https://api.eu.sendgrid.com (for EU regional subusers)

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.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>

on-behalf-ofstringOptional

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.

Property nameTypeRequiredDescription
limitstringOptional

The number of statistics to return on each page.


offsetstringOptional

The number of statistics to skip.


aggregated_byenum<string>Optional

How you would like the statistics to by grouped.

Possible values:
dayweekmonth

start_datestringrequired

The starting date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD


end_datestringOptional

The end date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD

Default: The day the request is made.
200
SchemaExample

Array of:

Property nameTypeRequiredDescriptionChild properties
datestring

The date that the stats were collected.


statsarray[object]

The Parse Webhook usage statistics.

Retrieves Inbound Parse Webhook statistics.Link to code sample: Retrieves Inbound Parse Webhook statistics.
1
const client = require('@sendgrid/client');
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const queryParams = {
5
"start_date": "2010-01-22",
6
"end_date": "The day the request is made."
7
};
8
9
const request = {
10
url: `/v3/user/webhooks/parse/stats`,
11
method: 'GET',
12
qs: queryParams
13
}
14
15
client.request(request)
16
.then(([response, body]) => {
17
console.log(response.statusCode);
18
console.log(response.body);
19
})
20
.catch(error => {
21
console.error(error);
22
});