When you submit a batch email verification job to the Verify API, it’s important to monitor its status to determine when processing is complete. This guide explains how to check the status of your job and interpret the response.
Step 1: Determine Polling Frequency
To avoid overloading your system or the API:
- Poll every 5–10 seconds for small files (under 1,000 records).
- Poll less frequently for larger files to reduce unnecessary requests.
Step 2: Make the API Call
Use the following cURL command to check the status of your batch job:
curl --location --request POST 'https://api.lastbounce.com/api/batch/<jobId>/status' \
--header 'x-api-key: YOUR_API_KEY'
Replace:
<jobId>with your specific batch job ID (e.g.,c4f3c554-76e2-4a0e-8331-5c7551a8a250)YOUR_API_KEYwith your actual API key
Step 3: Understand the API Response
The API returns a JSON object detailing the job’s progress. Example response:
{
"jobId": "c4f3c554-76e2-4a0e-8331-5c7551a8a250",
"countDetail": {
"validCount": 2,
"invalidCount": 0,
"acceptAllCount": 0,
"riskyCount": 0,
"duplicateCount": 0,
"unknownCount": 1
},
"totalEmail": 3,
"totalProcessedEmail": 3,
"status": "COMPLETED",
"createDate": "2022-03-01T03:57:15.97998Z",
"completeDate": "2022-03-01T03:57:27.724657Z",
"processedTime": 11,
"processed": 100
}
Key Fields Explained
- status:
"IN_PROGRESS"– The job is still running. Continue polling."COMPLETED"– The job has finished, and the results file is ready for download.
- countDetail:
Breakdown of results:validCount: Number of valid emailsinvalidCount,unknownCount,riskyCount, etc.: Additional categories for classificationduplicateCount: Number of duplicate entries detected
- totalEmail: Total emails submitted
- totalProcessedEmail: Number processed so far
- processed: Percent complete
- processedTime: Time (in seconds) the job took to complete
Step 4: Next Steps Based on Status
- If
statusisIN_PROGRESS→ Continue polling periodically. - If
statusisCOMPLETED→ Proceed to download the results file using the associatedjobId.
Comments
0 comments
Article is closed for comments.