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.
Bulk Email Address Validation: Asynchronous, bulk validation of up to one million email addresses.
This endpoint allows you to validate an email address.
Bearer <<YOUR_API_KEY_HERE>>
application/json
The email address that you want to validate.
Optional
A one-word classifier for where this validation originated.
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const data = {5source: "Newsletter",6email: "example@example.com",7};89const request = {10url: `/v3/validations/email`,11method: "POST",12body: data,13};1415client16.request(request)17.then(([response, body]) => {18console.log(response.statusCode);19console.log(response.body);20})21.catch((error) => {22console.error(error);23});
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:
1{2"email": "email@example.com",3"source": "Newsletter Signup"4}
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.