Verify a Single Email
Need to quickly check if an email address is valid? This guide walks you through verifying a single email using the Verify API.
Step 1: Make the API Request
Use the following cURL Command to verify a single email address:
curl --location --request POST \
'https://api.lastbounce.com/api/singleEmail/validate?email=virgilio.so@demandscience.com' \
--header 'x-api-key: YOUR_API_KEY'
🔐 Tip: Replace
YOUR_API_KEYwith your actual API key and use your target email address in the URL.
Step 2: Interpret the API Response
You'll receive a JSON response similar to the one below:
{
"email": "virgilio.so@demandscience.com",
"result": "VALID",
"resultDetail": "OK",
"corrected": false,
"verifiedEmail": "virgilio.so@demandscience.com",
"domain": "demandscience.com",
"localPart": "virgilio.so"
}
Key Fields Explained:
- email: The original email address submitted.
-
result: A brief summary of the validation status (e.g.,
VALID,INVALID,UNKNOWN). -
resultDetail: A more specific explanation (e.g.,
OK,MAILBOX_NOT_FOUND,DOMAIN_INVALID). - corrected: Indicates whether the email was auto-corrected.
- verifiedEmail: The validated (or corrected) email address.
- domain: The domain part of the email.
-
localPart: The portion before the
@.
Understanding the Results
- result gives you the high-level outcome.
- resultDetail explains why the result was returned.
For a full list of result and resultDetail values and what they mean, click here.
Verifying a Batch Upload
Need to verify a list of email addresses using the Verify API? Depending on your CSV file size, there are different approaches. This guide walks you through the process of uploading your file and understanding the response.
CSV File Size Guidelines
-
For files larger than 10MB:
Use thegenerateUploadUrlmethod to upload your file. You can find more details in the Verify API documentation. -
For files 10MB or smaller:
Use the standard upload method outlined below.
Step-by-Step: Uploading a CSV File
1. Format Your File
- Your CSV may include a header row.
- One of the column headers must include the word “Email” (e.g.,
Email,UserEmail, etc.). - The system will extract addresses from this column for validation.
- Click here for a sample CSV file and structure.
2. Upload the File
Use this cURL Command to submit your file:
curl --location --request POST 'https://api.lastbounce.com/api/batch/validation' \
--header 'x-api-key: YOUR_API_KEY' \
--form 'file=@"<path-to-your-file>/email_list.csv"'
Be sure to:
- Replace
YOUR_API_KEYwith your actual API key. - Replace
<path-to-your-file>/email_list.csvwith the actual path to your CSV file.
Understanding the API Response
After uploading your file, the batch verification process begins. The API will return a JSON response with file details and a unique batchJobId. Here’s an example:
{
"fileName": "email_list_with_header2.csv",
"fileSize": 83,
"fileContentType": "text/csv",
"fileId": 425,
"meta": {
"batchJobId": "c4f3c554-76e2-4a0e-8331-5c7551a8a250",
"emailCount": 3,
"duplicateCount": 0,
"spamtrapCount": 0,
"disposableCount": 0,
"roleAccountCount": 0,
"invalidFormatCount": 0,
"typoCount": 1
}
}
Key Fields:
- batchJobId: Use this ID to check the job status or download results.
- emailCount: Total email addresses submitted.
- typoCount, duplicateCount, etc.: Summary metrics of potential issues found in your file.
By following these steps, you’ll be able to efficiently upload your email list and start the verification process. Need help with large files or formatting? Reach out to our support team—we’re happy to assist.
Comments
0 comments
Please sign in to leave a comment.