For lists too big for a single call (up to a million addresses), use jobs. A job runs in the background, so you do not have to wait on one long request. It works in three steps.
1. Create the job
Send your addresses (or a link to a CSV file). We analyse the list and tell you how many addresses will be checked. Creating a job is free — nothing is charged yet.
curl https://www.cleanmylist.io/v1/jobs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "My list", "addresses": ["a@example.com", "b@example.com"]}'
2. Start the job
When you are happy with the estimate, start the job. This is when credits are used (1 per address).
curl -X POST https://www.cleanmylist.io/v1/jobs/JOB_ID/start \
-H "Authorization: Bearer YOUR_API_KEY"
3. Get the results
Once the job finishes, download the results as a CSV or as JSON.
curl https://www.cleanmylist.io/v1/jobs/JOB_ID/results?format=csv \
-H "Authorization: Bearer YOUR_API_KEY"
If you sent a link to a CSV file, the CSV results start with your own columns, named input_ plus the original column name (for example, input_first_name). Add headers=original to the address to keep the names exactly as they were in your file instead. If one of your columns has the same name as one of ours, such as email, ours is renamed to cleanmylist_email.
curl "https://www.cleanmylist.io/v1/jobs/JOB_ID/results?format=csv&headers=original" \
-H "Authorization: Bearer YOUR_API_KEY"
Note
Limits: up to 1,000,000 addresses per job. If your list of addresses is larger than 10 MB, send a link to a CSV file instead of the addresses themselves.
Did this help?
If you still have a question, we are happy to help.