Skip to main content
All CollectionsEmail Verification
Email Verifier - Realtime API
Email Verifier - Realtime API
Oleksandra Nesteruk avatar
Written by Oleksandra Nesteruk
Updated over a year ago

LeadRocks offers email verification services that you can access effortlessly via a straightforward REST API. With this API, you can instantly verify or uncover thousands of email addresses in real-time. Whether you need immediate validation or want to process emails in bulk, our service enables you to keep your email address list squeaky clean

API Base URL

LeadRocks API has a base URL to which all the endpoint paths are appended:

Generating an API Token

Once signed up and logged in, click on the Realtime API tab available on the top-left and then click "New app".

Successful apps will be listed under Apps with an API token. Use this token as a bearer value in all the API requests. Token can be turned on and off anytime.

Example - Using API Token

curl -X GET 'https://api.leadrocks.io/v1/getcredits' \
-H 'Authorization: REPLACE_WITH_YOUR_API_TOKEN'

Response Status Codes

These are the HTTP response codes that LeadRocks API uses to indicate the success or failure of a request:

200 Success

400 Bad Request

401 Unauthorized

403 Forbidden

404 Route not found

500 Internal Server Error

503 Service unavailable

524 Request Timeout

These are the error codes that LeadRocks API uses as part of error response object:

100 "Invalid API Token, please generate new token"

101 "Invalid data in JSON request"

102 "Internal server error, try again later"

103 "You have exhausted your credits, please add additional credits to continue"

104 "File size cannot exceed 10 MB or 10,000 lines"

105 "File contains incorrect content or has an extension that differs from .csv"

106 "File does not contain a column named \"email\" and request does not specify another column with email addresses \"email_column=COLUMN_NAME\""

107 "File does not contain any rows for validation"

108 "Invalid param list_id"

109 "You have reached the maximum number of bulk verify requests"

110 "You have reached the maximum number of instant verify requests"

111 "You have reached the maximum number of requests, please try again later"

Verify Response Status Values

After the successful email verification, every email address status is primarily categorized as either Valid, Not Invalid, Unknown, or Catch-All.

Valid - Specified email address has been verified as valid and safe to send.

Not valid - Specified email address has been verified as a bad recipient address that does not exist or is not accepting mail.

Catch-All - Specified email address accepts all emails and then simply discards the mail or bounces it back to the sender.

Unknown - Specified email address returns an unknown result as it was unable to get a response from the recipient's mail server.

Get Available Credits

Instantly get to know the available credits

GET:

Curl

-H 'Authorization: REPLACE_WITH_YOUR_API_TOKEN'

Success response:

{

"status":"success",

"data":{

"credits":10000

}

}

Error response:

{

"status":"failed",

"error":{

"code":0,

"message":"[ error message ]"

}

}

Single Verify

Single email can be verified in the following way:

POST

cURL

-H 'Authorization: REPLACE_WITH_YOUR_API_TOKEN' \

-H 'Content-Type: application/json' -d '{ "email": "[email protected]" }'

Success response:

{

"status":"success",

"data":{

"email_address":"[email protected]",

"status":"valid",

"safe_to_send":"no",

"disposable":"no",

"free_account":"no",

"role_account":"yes"

}

}

Error response:

{

"status":"failed",

"error":{

"code":0,

"message":"[ error message ]"

}

}

Bulk Verify

Use bulk verify to upload your contact lists, requests will be put on queue. At any point, you can check the status of your request.

POST

cURL

-H 'Authorization: REPLACE_WITH_YOUR_API_TOKEN \

-H 'Content-Type: multipart/form-data' \

-F file=@'REPLACE_WITH_YOUR_FILE_PATH' \

-F email_column='REPLACE_WITH_YOUR_COLUMN_NAME'

Success response:

{

"status":"success",

"data":{

"list_id":5618983940663962

}

}

Error response:

{

"status":"failed",

"error":{

"code":0,

"message":"[ error message ]"

}

}

Progress status

GET

cURL

-H 'Authorization: REPLACE_WITH_YOUR_API_TOKEN'

Success response:

{

"status":"success",

"data":{

"list_id":5618983940663962,

"progress_status":"completed"

}

}

Error response:

{

"status":"failed",

"error":{

"code":0,

"message":"[ error message ]"

}

}

Download bulk result

Curl

-H 'Authorization: REPLACE_WITH_YOUR_API_TOKEN' -o result.csv

Did this answer your question?