Need to verify a list of email addresses using the Intelligent Verification API? Depending on your CSV file size, there are different methods to follow. This guide will walk you through the process.
CSV File Size Consideration:
-
For Files Larger than 10MB: If your CSV file exceeds 10MB, utilize the
generateUploadUrl
method. More details on this can be found in the LastBounce API documentation. -
For Files Under 10MB: Continue with the steps below.
Uploading a CSV File:
-
File Formatting: Your CSV may include an optional header row, but it's crucial that one of the column headers contains the word 'Email'. The system will extract email addresses from this column for verification. For a sample CSV file and its structure, click here.
-
Initiate the Upload: Use the following cURL request to upload your CSV file:
curl \ --location \ --request POST 'https://api.lastbounce.com/api/batch/validation' \ --header 'x-api-key: DdTHUVFAI4Q6u810nlKhfIhHHo8qmoYqJD4Ns7jJ' \ --form 'file=@"/file/path/email_list.csv"'
Ensure you replace
"/file/path/email_list.csv"
with the actual path to your CSV file. -
Understanding the Response: Once the CSV file is uploaded, the batch verification process initiates. The API will respond with a JSON containing details about the upload and a unique
batchJobId
. Here's a sample response:{ "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 } }
The
batchJobId
can be used later to check the status and results of the batch verification process.
Comments
0 comments
Article is closed for comments.