File Sending API for Email and Mobile
The Captain Verify sending API is the ideal solution for businesses and developers looking to optimize their marketing campaigns and improve the quality of their database. By integrating this API into your existing tools, you can fully take advantage of the advanced verification features of Captain Verify, while enjoying time and better productivity. Thanks to our API, you can send files (CSV, TXT) containing email addresses or mobile numbers to check directly from your application or platform, without having to go through the Dashboard. Our infrastructure ensures rapid and secure processing of your files.
An account is necessary to generate the key for the API, this is what will give you access to the service.
The API is limited to a 1 file by verification.
You can put up to 1 million lines per email file and 100,000 lines per mobile number file. (20mo max)
Make sure your application does not exceed these limits.
To recover the list of files and status:
curl -X GET "https://api.captainverify.com/file/?apikey=APIKEY"
|file validation||The file is in importing and validation to Captain Verify|
|ready||The file is ready for verification|
|invalid||The file is not valid|
|processing||The file is in verification courtyard|
|done||The verification is completed, the file can be downloaded|
Launch a verification
To launch a "ready" file verification :
curl -X PUT "https://api.captainverify.com/file/21218?apikey=APIKEY"
⚠️ The file must be in the "ready" status.
"21218" is an example and it must be replaced by the ID of your file.
|success||[ 'status' => 'file #21218' sent for mobile validation' ]|
|not enough credits||[ 'error' => 'not enough credit' ]|
Send a file
To send a file (TXT, CSV):For an email file
curl -X POST -F firstname.lastname@example.org "https://api.captainverify.com/file/email?apikey=APIKEY"
file1.txt is the name of the local file.For a mobile file
curl -X POST -F email@example.com "https://api.captainverify.com/file/hlr?apikey=APIKEY"
file2.txt is the name of the local file.
|success response||[ 'status' => 'file file2.txt received' ]|
Delete a file
To delete a file:
curl -X DELETE "https://api.captainverify.com/file/21218?apikey=APIKEY"
21218 is an example and it must be replaced by the ID of your file that you want to delete.
⚠️ The status of the file must be: ready, invalid, done to be deleted.
Download the results of a verification
To download the results of a verification, you have 3 files available : all, ok and marketing* (More information in the documentation). 2 file formats are available : CSV or XLSX.
curl -X GET --output ok.csv "https://api.captainverify.com/file/21218/ok?apikey=APIKEY&ext=xlsx"
21218 is an example and it must be replaced by the ID of your file.
&ext=xlsx is the file format by Default, you can replace it with &ext=csv to change the format to CSV.
*The marketing file is only available for new verified files.
In case of error:
|error response||[ 'error' => ‘xxxxxxxxxxx’ ]|