Skip to contentSkip to navigationSkip to topbar
Rate this page:
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.

Event types

event-types page anchor

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.


GET/v3/user/webhooks/parse/stats

Base url: https://api.sendgrid.com

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.


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.

retrieves-inbound-parse-webhook-statistics page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
curl

_22
const client = require('@sendgrid/client');
_22
client.setApiKey(process.env.SENDGRID_API_KEY);
_22
_22
const queryParams = {
_22
"start_date": "2010-01-22",
_22
"end_date": "The day the request is made."
_22
};
_22
_22
const request = {
_22
url: `/v3/user/webhooks/parse/stats`,
_22
method: 'GET',
_22
qs: queryParams
_22
}
_22
_22
client.request(request)
_22
.then(([response, body]) => {
_22
console.log(response.statusCode);
_22
console.log(response.body);
_22
})
_22
.catch(error => {
_22
console.error(error);
_22
});


Rate this page: