API

Listcleaner API Documentation

Our Email list cleaning API is easy to use and integrates within any software language.

Here you can find our email list cleaning API documentation, with standard cURL request examples.

We also have ready made API examples for you in 7 popular programming languages.

Getting started

Your API key
You can retrieve and renew your API key by clicking on the "API KEY" button, on the Listcleaner dashboard.

Click here to go to your dashboard.
Your Username
Your username is the same as your account's email address
API Request parameters

Every request to our List Cleaning API requires these header parameters:

X-User-Email string
X-Api-Key string

Depending on the API call other query parameters are:

uid string This uid is the identifier of an uploaded data file.
file string($binary) The comma separated CSV file to be uploaded
mapping string The column name of your CSV file containing the email adresses
reference string Reference for your datafile
export_type string Choose options: all, ok, bad, for the requested dataset download.

API Response codes

Every response from our List Cleaning API come with a response code

200 Success
401 Unauthorized (check your username and API key)
400 Missing UID or other request error (check if the UID is in the request)
404 File not found (File not found or not ready for download)
404 File not found (File not found or not ready for download)

Listcleaner API Request examples

Choose your programming language

Listcleaner API request examples

Listcleaner API - cURL examples

cURL

/get_credits

Retrieve the amount of available credits

Request:

vim
				curl -X 'GET' \
  'https://api.listcleaner.net/get_credits' \
  -H 'accept: application/json' \
  -H 'X-User-Email: username@domain.com' \
  -H 'X-Api-Key: YOUR_API_KEY'

			

Response (code 200):

vim
				{
  "credits": 0
}
			

cURL

/upload_list

Upload your email data file to be cleaned

Request:

vim
				curl -X 'POST' \
  'https://api.listcleaner.net/upload_list' \
  -H 'accept: application/json' \
  -H 'X-User-Email: username@domain.com' \
  -H 'X-Api-Key: YOUR_API_KEY' \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@YOUR_FILENAME.csv;type=text/csv' \
  -F 'mapping=YOUR_MAPPING_COLUMN' \
  -F 'reference=YOUR_REFERENCE'

			

Response (code 200):

vim
				{
  "status": "File uploaded successfully",
  "uid": "d53dec-bac2b5-34dfd1",
  "records_total": 28391
}
			

cURL

/show_lists

Have a look at all your lists

?uid is optional and will only show that specific list.

Request:

vim
				curl -X 'GET' \
  'https://api.listcleaner.net/show_lists?uid=abc123-def456-ghi789' \
  -H 'accept: application/json' \
  -H 'X-User-Email: username@domain.com' \
  -H 'X-Api-Key: YOUR_API_KEY'

			

Response (code 200):

vim
				{
  "lists": [
    {
      "uid": "abc123-def456-ghi789",
      "created": "2024-01-01 00:00:01",
      "filename_original": "dummy.csv",
      "reference": "Dummy File Upload",
      "mapping": "emailaddress",
      "records_total": 436,
      "records_processed": "436",
      "records_ok": "405",
      "records_bad": "31",
      "records_bad_breakdown": "{\"catch_all\": 2, \"blacklisted_email\": 1, \"spamtrap\": 1, \"account_inactive\": 4, \"syntax_error\": 1, \"mx_server_offline\": 1, \"invalid_mx\": 3, \"disposable_domain\": 16, \"mx_server_error\": 2}",
      "paid": "paid",
      "current_step": "done",
      "current_status": "done",
      "last_status_update": "2024-01-01 00:01:02"
    }
  ]
}
			

cURL

/download_list

Download your cleaned lists, when its current_status is "done".

Options:
all -> Export of all the data
ok -> Export of the clean data
bad -> Export of the bad data
The statuses can be found in the "reason" column.

(We use "abc123-def456-ghi789" as example uid.)

Request:

vim
				curl -X 'GET' \
  'https://api.listcleaner.net/download_list?uid=abc123-def456-ghi789&export_type=all' \
  -H 'accept: */*' \
  -H 'X-User-Email: username@domain.com' \
  -H 'X-Api-Key: YOUR_API_KEY'

			

cURL

/delete_list

Remove your list from the panel

Request:

vim
				curl -X 'POST' \
  'https://api.listcleaner.net/delete_list?uid=abc123-def456-ghi789' \
  -H 'accept: */*' \
  -H 'X-User-Email: username@domain.com' \
  -H 'X-Api-Key: YOUR_API_KEY' \
  -d ''

			

Response (code 200):

vim
				{
  "status": "List removed successfully"
}
			

Need Any Help? Or Looking For an Agent

Working Hours : Monday - Friday 09:00 - 19:00 CET
© 2024 | All Rights Reserved.