---
title: SendGrid
description: Collect metrics for Sendgrid.
breadcrumbs: Docs > Integrations > SendGrid
---

# SendGrid
Integration version1.0.0


## Overview{% #overview %}

Twilio SendGrid is an email platform that businesses use for sending transactional and marketing email. Use this integration to collect your SendGrid email delivery and engagement metrics and logs.

## Setup{% #setup %}

### Generate SendGrid API Key{% #generate-sendgrid-api-key %}

1. Login to your [SendGrid account](https://app.sendgrid.com/).
1. Open the **Settings** dropdown.
1. Click **API Keys**.
1. Click **Create API Key** at the top right.
1. Fill out the *API Key Name*. Select **Full Access** or, for restricted access, **Stats** - **Global Stats**, **Stats** - **Stats Overview** and **User Account** - **Timezone**.
1. Copy the API Key to somewhere secure. The API key will be needed when you set up the SendGrid Integration on Datadog's user interface.

### Configuration{% #configuration %}

#### Send metrics{% #send-metrics %}

1. Navigate to the configuration tab inside the Datadog [SendGrid integration tile](https://app.datadoghq.com/account/settings#integrations/sendgrid).
1. Enter a unique identifying name for the SendGrid account in Datadog.
1. Paste in the API Key that was generated in the steps above.
1. Optionally, add custom tags to associate tags with all metrics collected for this integration.

#### Send Logs{% #send-logs %}

1. Copy the generated URL inside the Datadog [SendGrid integration tile](https://app.datadoghq.com/account/settings#integrations/sendgrid).
1. Go to your [SendGrid account](https://app.sendgrid.com/).
1. Open the **Settings** dropdown.
1. Click **Mail Settings**.
1. Click **Edit** on the **Event Webhook** setting.
1. Paste in the generated URL in step 1 to the **HTTP Post URL**.
1. Leave **Authorization Method** set to *None*.
1. Select what delivery and engagement events you'd like to receive.
1. Enable the **Event Webhook Status**.
1. Click **Save**.

{% alert level="info" %}
You must allow-list certain IP address prefixes to enable Datadog to collect data from your SendGrid account.The list of IP prefixes belonging to Datadog can be found in the IP ranges page, and the range to allow can be found under **webhooks** on that page.
{% /alert %}

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **sendgrid.emails.blocks**(gauge)                          | The number of emails that were not allowed to be delivered by ISPs.*Shown as email*                                                      |
| **sendgrid.emails.bounce\_drops**(gauge)                   | The number of emails that were dropped because of a bounce.*Shown as email*                                                              |
| **sendgrid.emails.bounces**(gauge)                         | The number of emails that bounced instead of being delivered.*Shown as email*                                                            |
| **sendgrid.emails.deferred**(gauge)                        | The number of emails that temporarily could not be delivered.*Shown as email*                                                            |
| **sendgrid.emails.delivered**(gauge)                       | The number of emails SendGrid was able to confirm were actually delivered to a recipient.*Shown as email*                                |
| **sendgrid.emails.invalid\_emails**(gauge)                 | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid.*Shown as email*       |
| **sendgrid.emails.processed**(gauge)                       | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed.*Shown as email*               |
| **sendgrid.emails.requests**(gauge)                        | The number of emails that were requested to be delivered.*Shown as email*                                                                |
| **sendgrid.emails.spam\_report\_drops**(gauge)             | The number of emails that were dropped due to a recipient previously marking your emails as spam.*Shown as email*                        |
| **sendgrid.emails.spam\_reports**(gauge)                   | The number of recipients who marked your email as spam.*Shown as email*                                                                  |
| **sendgrid.emails.unsubscribe\_drops**(gauge)              | The number of emails dropped due to a recipient unsubscribing from your emails.*Shown as email*                                          |
| **sendgrid.emails.unsubscribes**(gauge)                    | The number of recipients who unsubscribed from your emails.*Shown as email*                                                              |
| **sendgrid.emails.clicks**(gauge)                          | The number of links that were clicked in your emails.*Shown as email*                                                                    |
| **sendgrid.emails.unique\_clicks**(gauge)                  | The number of unique recipients who clicked links in your emails.*Shown as email*                                                        |
| **sendgrid.emails.opens**(gauge)                           | The total number of times your emails were opened by recipients.*Shown as email*                                                         |
| **sendgrid.emails.unique\_opens**(gauge)                   | The number of unique recipients who opened your emails.*Shown as email*                                                                  |
| **sendgrid.emails.daily.total.blocks**(gauge)              | The daily number of emails that were not allowed to be delivered by ISPs.*Shown as email*                                                |
| **sendgrid.emails.daily.total.bounce\_drops**(gauge)       | The daily number of emails that were dropped because of a bounce.*Shown as email*                                                        |
| **sendgrid.emails.daily.total.bounces**(gauge)             | The daily number of emails that bounced instead of being delivered.*Shown as email*                                                      |
| **sendgrid.emails.daily.total.deferred**(gauge)            | The daily number of emails that temporarily could not be delivered.*Shown as email*                                                      |
| **sendgrid.emails.daily.total.delivered**(gauge)           | The daily number of emails SendGrid was able to confirm were actually delivered to a recipient.*Shown as email*                          |
| **sendgrid.emails.daily.total.invalid\_emails**(gauge)     | The daily number of recipients who had malformed email addresses or whose mail provider reported the address as invalid.*Shown as email* |
| **sendgrid.emails.daily.total.processed**(gauge)           | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed daily.*Shown as email*         |
| **sendgrid.emails.daily.total.requests**(gauge)            | The daily number of emails that were requested to be delivered.*Shown as email*                                                          |
| **sendgrid.emails.daily.total.spam\_report\_drops**(gauge) | The daily number of emails that were dropped due to a recipient previously marking your emails as spam.*Shown as email*                  |
| **sendgrid.emails.daily.total.spam\_reports**(gauge)       | The daily number of recipients who marked your email as spam.*Shown as email*                                                            |
| **sendgrid.emails.daily.total.unsubscribe\_drops**(gauge)  | The daily number of emails dropped due to a recipient unsubscribing from your emails.*Shown as email*                                    |
| **sendgrid.emails.daily.total.unsubscribes**(gauge)        | The daily number of recipients who unsubscribed from your emails.*Shown as email*                                                        |
| **sendgrid.emails.daily.total.clicks**(gauge)              | The daily number of links that were clicked in your emails.*Shown as email*                                                              |
| **sendgrid.emails.daily.total.unique\_clicks**(gauge)      | The daily number of unique recipients who clicked links in your emails.*Shown as email*                                                  |
| **sendgrid.emails.daily.total.opens**(gauge)               | The daily total number of times your emails were opened by recipients.*Shown as email*                                                   |
| **sendgrid.emails.daily.total.unique\_opens**(gauge)       | The daily total of unique recipients who opened your emails.*Shown as email*                                                             |

### Logs{% #logs %}

Sendgrid delivery and engagement events will show up as logs under the source `sendgrid`.

### Events{% #events %}

The SendGrid integration does not include any events.

### Service Checks{% #service-checks %}

The SendGrid integration does not include any service checks.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help).

## Further Reading{% #further-reading %}

- [Integration roundup: Understanding email performance with Datadog](https://www.datadoghq.com/blog/email-performance-integrations/)
