Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Real Time Email Address Validation - API Reference



API Overview

api-overview page anchor

Email Address Validation is available to Email API Pro and Premier level accounts only. An Email Validation API key is required. See the Email Address Validation overview page for more information.

The Email Address Validation API provides detailed information about the validity of email addresses, which helps you create and maintain contact lists and reduce bounce rates.

This API provides two options:

  • Real Time Email Address Validation: real time, detailed information on the validity of a single email address.

    • Use this option to prompt users that they've provided an invalid email, prevent invalid emails from entering your database.
  • Bulk Email Address Validation: Asynchronous, bulk validation of up to one million email addresses.

    • Use this option to help you remove invalid emails from your existing lists.

POST/v3/validations/email

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

This endpoint allows you to validate an email address.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
SchemaExample
Property nameTypeRequiredDescriptionChild properties
emailstringrequired

The email address that you want to validate.


sourcestringOptional

A one-word classifier for where this validation originated.

200
SchemaExample
Property nameTypeRequiredDescriptionChild properties
resultobject

Validate an email

validate-an-email 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 data = {
_22
"source": "Newsletter",
_22
"email": "example@example.com"
_22
};
_22
_22
const request = {
_22
url: `/v3/validations/email`,
_22
method: 'POST',
_22
body: data
_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
});

The optional source parameter can be used identify the source of the email address. if you choose to integrate with multiple email address captures and want to be able to compare their results.

The source must be a string, only using alphanumeric characters and spaces. For example:


_10
{
_10
"email": "email@example.com",
_10
"source": "Newsletter Signup"
_10
}

There is a limit of 50 sources. Sources are automatically deleted once the last validation to use that source falls off the 30 day window. You can continue to make validations without a source if you've hit the limit.


Rate this page: