Skip to content
ProspectAPIs

API reference / Email verification

Clean a list

Written and maintained by The ProspectAPIs team

POST/v1/email/clean

POST /v1/email/clean is the ProspectAPIs operation emailClean, in the Email verification group of the REST API. Sorts up to 1,000 addresses into keep, review and remove with quick checks; no mail server is contacted. $0.001 per well-formed address. Cost: $0.001 per address (quick checks, up to 1,000 a call). Send your API key as a Bearer token in the Authorization header.

How this fits with the rest of the email verification API, with worked examples, is in the email verification guide.

Parameters

This operation takes no path or query parameters.

Request body

JSON.

Request body of POST /v1/email/clean
FieldTypeDescription
emails requiredarray of string
Example body
{
  "emails": [
    "emails"
  ]
}

Responses

Response codes of POST /v1/email/clean
StatusMeaning
200The sorted list.
400The request was invalid (e.g. a bad filter or input); nothing was charged.
401The API key is missing or invalid.
402Out of credits. The body carries top_up_url; nothing was charged.

Every error answers with the same JSON body, an error string and sometimes a code; the errors page lists each status and when it happens.

200 response fields

The sorted list.

Fields of the 200 response
FieldTypeDescription
keeparray of string
reviewarray of object
review[].emailstring
review[].reasonstring
review[].did_you_meanstring or null
removearray of object
remove[].emailstring
remove[].reasonstring
remove[].reason_textstring
not_checkedarray of string
countsobject
amount_usdnumber
notestring

Code samples

Each sample sends the same request. Set PROSPECTAPIS_KEY in your environment first. Values come from the spec's examples; replace them with your own.

curl
curl -X POST https://api.prospectapis.com/v1/email/clean \
  -H "Authorization: Bearer $PROSPECTAPIS_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "emails": [ "emails" ] }'
JavaScript (fetch)
const res = await fetch("https://api.prospectapis.com/v1/email/clean", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROSPECTAPIS_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "emails": [
      "emails"
    ]
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${(await res.json().catch(() => ({}))).error ?? res.statusText}`);
const data = await res.json();
console.log(data);
Python (requests)
import os, requests

res = requests.post(
    "https://api.prospectapis.com/v1/email/clean",
    headers={"Authorization": f"Bearer {os.environ['PROSPECTAPIS_KEY']}"},
    json={
        "emails": ["emails"],
    },
    timeout=30,
)
res.raise_for_status()
data = res.json()
print(data)

Billing

Billing reserves before it serves: the call holds what it may cost, serves at most what that hold covers, and refunds the rest when the response closes. Any non-2xx answer refunds the whole hold, so a failed call costs nothing. The response reports your balance in X-Credits-Remaining.

The email verification guide covers this area end to end. Previous operation: What a score means. Next operation: Start a verification job. Every operation, grouped by area, is on the API reference index.

Create a free account to get a key, then run the samples above with your own values (this call acts for real, so use real inputs).

Was this page helpful?