---
title: "Validate contact data in SendGrid"
url: "https://lookvalid.com/integrations/sendgrid.md"
canonical_url: "https://lookvalid.com/integrations/sendgrid"
last_updated: "2026-10-30"
type: "how-to"
summary: "Add an email-domain check to the contacts you upsert into SendGrid Marketing so segments exclude throwaway and role addresses."
related: ["https://lookvalid.com/integrations.md", "https://lookvalid.com/docs/api/email-domain-check.md", "https://lookvalid.com/docs/quickstart.md"]
---

# Validate contact data in SendGrid

> **For AI agents:** the complete index of LookValid pages is [llms.txt](https://lookvalid.com/llms.txt). Every page is also served as markdown at its URL plus .md.

Add an email-domain check to the contacts you upsert into SendGrid Marketing so segments exclude throwaway and role addresses.

SendGrid Marketing campaigns send to segments built from contact fields, and a contact added by an API call is mailable immediately. One bad domain in a large upsert harms the shared reputation of the sending identity before anyone reads a report.

## What LookValid checks

- [Email Domain Check](https://lookvalid.com/products/email-domain-check.md): Reads the domain behind an address: mail records, SPF, DMARC, throwaway domains, free providers and role mailboxes. It never contacts the mail server, so it cannot confirm that a mailbox exists. (1 credit per address checked)
- [Domain Age](https://lookvalid.com/products/domain-age.md): Returns registration and expiry dates and age in days from the registry, which flags a domain registered last week. (2 credits per registered domain (unregistered domains are free))
- [Phone Numbering-Plan Validation](https://lookvalid.com/products/phone.md): Checks a phone number against its country numbering plan and returns E.164 and the number type. It does not say whether the line is active. (1 credit per valid number)

## Connect it in four steps

1. Create a LookValid account and generate an API key from the dashboard, which a person does once.
2. Store the LookValid key and the SendGrid API key as separate environment variables, and create three custom fields in Marketing settings, noting that the API addresses custom fields by id.
3. Check each address before it joins the batch; contacts with found:false go in unflagged, and an error answer stops the batch with the code and fix.
4. Send the batch as a PUT to /v3/marketing/contacts with each contact's values under custom_fields keyed by field id, then segment on the disposable field.

A Node script that checks each row before it builds the upsert request for SendGrid. The call is `POST https://YOUR_API_HOST/v1/email-domain-check`.

```js
const API_URL = "https://YOUR_API_HOST/v1/email-domain-check";

export async function validateSendgridContact(value) {
  const response = await fetch(API_URL, {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.LOOKVALID_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "email": value,
    }),
  });
  const result = await response.json();
  if (!response.ok) throw new Error(`${result.error.code}: ${result.error.fix}`);
  if (!result.found) return null;
  return {
      "email_signal": result.data?.deliverability_signal ?? null,
      "email_disposable": result.data?.disposable ?? null,
      "email_role": result.data?.role_account ?? null,
  };
}
```

| Response field | Goes into |
| --- | --- |
| `data.deliverability_signal` | email_signal |
| `data.disposable` | email_disposable |
| `data.role_account` | email_role |

## Without code

Automation platforms with a generic HTTP step can place the LookValid call before a SendGrid contact upsert, so unflagged addresses only reach the upsert step.

## Questions

### What does a check cost in credits?

Each call uses the credits listed for the product on the pricing page, so the monthly use in SendGrid follows the number of addresses you check.

### What does the email check not do?

It looks at the domain only. It does not contact the mail server and cannot say whether a particular mailbox exists, so treat a good signal as a domain that can receive mail.

### How are custom fields named in the SendGrid call?

By field id inside custom_fields, not by display name, so read the ids from the custom fields list first.

## Sources

- [SendGrid API: add or update a contact](https://www.twilio.com/docs/sendgrid/api-reference/contacts/add-or-update-a-contact), read 2026-10-30

## Related

- [Tool integrations for phone, email and IP checks](https://lookvalid.com/integrations.md)
- [Email Domain Check reference](https://lookvalid.com/docs/api/email-domain-check.md)
- [Quickstart](https://lookvalid.com/docs/quickstart.md)
