> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# SendGrid

> Twilio SendGrid email: delivery statistics, email activity, bounces and spam reports, and credit balance.

![](https://mintcdn.com/webrouter/T_A5Quwg50s_JK2y/logo/data-apis/sendgrid.webp?fit=max\&auto=format\&n=T_A5Quwg50s_JK2y\&q=85\&s=a82312788fa841177a67814f565ceec2)

[Web Catalog · Messaging](https://docs.webrouter.net/data-apis.md?category=messaging)

Needs&#x20;

`SENDGRID_API_KEY`

Endpoints

6

Auth

Key in header

[Vendor docs](https://www.twilio.com/docs/sendgrid/api-reference/how-to-use-the-sendgrid-v3-api)

&#x20;·&#x20;

[Pricing](https://sendgrid.com/en-us/pricing)

## Setup

| Variable | | What it is |
| - | - | - |
| `SENDGRID_API_KEY` | required | A SendGrid API key (SG....) from Settings > API Keys; its scopes limit which endpoints answer. |
| `SENDGRID_API_HOST` | optional | api.sendgrid.com for global accounts; api.eu.sendgrid.com for EU regional subusers. Default `api.sendgrid.com`. One of `api.sendgrid.com`, `api.eu.sendgrid.com`. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Every path is under /v3. A key without the endpoint's scope answers 403.
* Rate limits are per endpoint and reported in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a 429 means wait until the reset.
* Suppression lists page by limit (max 500) and offset; times there are unix seconds, while stats take YYYY-MM-DD dates.
* Email address validation needs a Pro or Premier plan and its own Email Validation key, so it is not in this entry.

## Endpoints

GET

Get global email statistics

Requests, delivered, opens, clicks, bounces and spam reports per day, week or month.

[Open](#sendgrid-stats-global)

GET

Search email activity

Recent messages matching a query on recipient, subject, status and more.

[Open](#sendgrid-messages-search)

GET

Get one message's activity

Delivery events and details of one message.

[Open](#sendgrid-messages-get)

GET

List bounces

Addresses that bounced, with reason and time.

[Open](#sendgrid-bounces-list)

GET

List spam reports

Addresses that marked mail as spam.

[Open](#sendgrid-spam-reports-list)

GET

Get credit balance

Emails left before per-email charges, and the reset schedule.

[Open](#sendgrid-credits-get)

### Get global email statistics

GET

`/v3/stats`

`sendgrid.stats.global`

Requests, delivered, opens, clicks, bounces and spam reports per day, week or month.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`start_date` required</td><td>string</td><td>query</td><td>YYYY-MM-DD. Example `2026-11-01`</td></tr>

    <tr>
      <td>
        `end_date`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        YYYY-MM-DD, default today.
      </td>
    </tr>

    <tr><td>`aggregated_by`</td><td>string</td><td>query</td><td>Grouping. One of `day`, `week`, `month`</td></tr>

    <tr>
      <td>
        `on_behalf_of`
      </td>

      <td>
        string
      </td>

      <td>
        header
      </td>

      <td>
        Subuser to act for, with the parent account's key.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.twilio.com/docs/sendgrid/api-reference/stats/retrieve-global-email-statistics) · Same job: [Amplitude](https://docs.webrouter.net/data-apis/amplitude.md#amplitude-charts-query), [Close](https://docs.webrouter.net/data-apis/close-crm.md#close-crm-reports-activity), [Cloudflare](https://docs.webrouter.net/data-apis/cloudflare.md#cloudflare-analytics-graphql), [Google Analytics 4 (Data API)](https://docs.webrouter.net/data-apis/google-analytics.md#google-analytics-report-run), [Instagram Graph API](https://docs.webrouter.net/data-apis/instagram.md#instagram-user-insights), [Klaviyo](https://docs.webrouter.net/data-apis/klaviyo.md#klaviyo-campaigns-report)

```python Python theme={null}
router.call_data_api("sendgrid.stats.global", {'start_date': '2026-11-01'})
```

```text MCP theme={null}
call_data_api(endpoint="sendgrid.stats.global", params={"start_date": "2026-11-01"})
```

### Search email activity

GET

`/v3/messages`

`sendgrid.messages.search`

Recent messages matching a query on recipient, subject, status and more.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `query`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Filter in SendGrid's query syntax, e.g. to\_email="someone\@example.com"; up to 160 conditions.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        1 to 1000, default 10.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.twilio.com/docs/sendgrid/api-reference/email-activity/filter-all-messages) · Same job: [Slack](https://docs.webrouter.net/data-apis/slack.md#slack-search-messages)

> [!NOTE]
>
> * Needs the paid Email Activity history add-on; without it the call is refused.
> * Values in the query are double-quoted: to\_email="[a@b.com](mailto:a@b.com)" (URL-encoded on the wire).

### Get one message's activity

GET

`/v3/messages/{msg_id}`

`sendgrid.messages.get`

Delivery events and details of one message.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `msg_id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        The message id.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.twilio.com/docs/sendgrid/api-reference/email-activity/filter-messages-by-message-id)

> [!NOTE]
>
> * Needs the Email Activity history add-on; no data for EU regional subusers.

### List bounces

GET

`/v3/suppression/bounces`

`sendgrid.bounces.list`

Addresses that bounced, with reason and time.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `start_time`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Unix seconds, inclusive start of creation time.
      </td>
    </tr>

    <tr>
      <td>
        `end_time`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Unix seconds, inclusive end.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Page size, max 500.
      </td>
    </tr>

    <tr>
      <td>
        `offset`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Items to skip.
      </td>
    </tr>

    <tr>
      <td>
        `email`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Only addresses starting with this prefix.
      </td>
    </tr>

    <tr>
      <td>
        `on_behalf_of`
      </td>

      <td>
        string
      </td>

      <td>
        header
      </td>

      <td>
        Subuser to act for, with the parent account's key.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.twilio.com/docs/sendgrid/api-reference/bounces-api/retrieve-all-bounces)

```python Python theme={null}
router.call_data_api("sendgrid.bounces.list")
```

```text MCP theme={null}
call_data_api(endpoint="sendgrid.bounces.list")
```

### List spam reports

GET

`/v3/suppression/spam_reports`

`sendgrid.spam_reports.list`

Addresses that marked mail as spam.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `start_time`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Unix seconds, inclusive start of creation time.
      </td>
    </tr>

    <tr>
      <td>
        `end_time`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Unix seconds, inclusive end.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Page size, max 500.
      </td>
    </tr>

    <tr>
      <td>
        `offset`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Items to skip.
      </td>
    </tr>

    <tr>
      <td>
        `email`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Only addresses starting with this prefix.
      </td>
    </tr>

    <tr>
      <td>
        `on_behalf_of`
      </td>

      <td>
        string
      </td>

      <td>
        header
      </td>

      <td>
        Subuser to act for, with the parent account's key.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.twilio.com/docs/sendgrid/api-reference/spam-reports-api/retrieve-all-spam-reports)

```python Python theme={null}
router.call_data_api("sendgrid.spam_reports.list")
```

```text MCP theme={null}
call_data_api(endpoint="sendgrid.spam_reports.list")
```

### Get credit balance

GET

`/v3/user/credits`

`sendgrid.credits.get`

Emails left before per-email charges, and the reset schedule.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `on_behalf_of`
      </td>

      <td>
        string
      </td>

      <td>
        header
      </td>

      <td>
        Subuser to act for, with the parent account's key.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.twilio.com/docs/sendgrid/api-reference/users-api/retrieve-your-credit-balance)

```python Python theme={null}
router.call_data_api("sendgrid.credits.get")
```

```text MCP theme={null}
call_data_api(endpoint="sendgrid.credits.get")
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.