Verify an email address
curl --request POST \
--url https://app.pipecorn.com/api/v2/contacts/verify_email \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"email": "william.hewish@acme.com",
"webhook_url": "<string>"
}
'import requests
url = "https://app.pipecorn.com/api/v2/contacts/verify_email"
payload = {
"email": "william.hewish@acme.com",
"webhook_url": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'william.hewish@acme.com', webhook_url: '<string>'})
};
fetch('https://app.pipecorn.com/api/v2/contacts/verify_email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.pipecorn.com/api/v2/contacts/verify_email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'william.hewish@acme.com',
'webhook_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.pipecorn.com/api/v2/contacts/verify_email"
payload := strings.NewReader("{\n \"email\": \"william.hewish@acme.com\",\n \"webhook_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.pipecorn.com/api/v2/contacts/verify_email")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"william.hewish@acme.com\",\n \"webhook_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/contacts/verify_email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"william.hewish@acme.com\",\n \"webhook_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"verification_id": "3f6b2c1e-8d4a-4b7e-9c2f-5a1d0e7b6c48",
"status": "pending",
"email": "william.hewish@acme.com",
"deliverability": null,
"score": null,
"catch_all_domain": null,
"disposable": null,
"role_based": null,
"free_provider": null,
"mx_records": null,
"smtp_provider": null,
"verified_at": null,
"credits_charged": 0,
"error": null,
"status_url": "https://app.pipecorn.com/api/v2/contacts/verify_email/3f6b2c1e-8d4a-4b7e-9c2f-5a1d0e7b6c48"
}{
"error": "Invalid email"
}{
"error": "Not enough enrichment credits left",
"code": "insufficient_credits",
"top_up_url": "https://app.pipecorn.com/settings/subscriptions/credits"
}{
"error": "You have reached your weekly enrichment credit limit for this workspace",
"code": "workspace_limit_exceeded"
}{
"error": "A request with this Idempotency-Key is still being processed",
"code": "idempotency_key_in_use"
}{
"error": "Rate limit exceeded. Please wait before retrying."
}Waterfall Enrichment
Verify an email address
Check that an email address accepts mail before you send to it
POST
/
contacts
/
verify_email
Verify an email address
curl --request POST \
--url https://app.pipecorn.com/api/v2/contacts/verify_email \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"email": "william.hewish@acme.com",
"webhook_url": "<string>"
}
'import requests
url = "https://app.pipecorn.com/api/v2/contacts/verify_email"
payload = {
"email": "william.hewish@acme.com",
"webhook_url": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'william.hewish@acme.com', webhook_url: '<string>'})
};
fetch('https://app.pipecorn.com/api/v2/contacts/verify_email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.pipecorn.com/api/v2/contacts/verify_email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'william.hewish@acme.com',
'webhook_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.pipecorn.com/api/v2/contacts/verify_email"
payload := strings.NewReader("{\n \"email\": \"william.hewish@acme.com\",\n \"webhook_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.pipecorn.com/api/v2/contacts/verify_email")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"william.hewish@acme.com\",\n \"webhook_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/contacts/verify_email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"william.hewish@acme.com\",\n \"webhook_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"verification_id": "3f6b2c1e-8d4a-4b7e-9c2f-5a1d0e7b6c48",
"status": "pending",
"email": "william.hewish@acme.com",
"deliverability": null,
"score": null,
"catch_all_domain": null,
"disposable": null,
"role_based": null,
"free_provider": null,
"mx_records": null,
"smtp_provider": null,
"verified_at": null,
"credits_charged": 0,
"error": null,
"status_url": "https://app.pipecorn.com/api/v2/contacts/verify_email/3f6b2c1e-8d4a-4b7e-9c2f-5a1d0e7b6c48"
}{
"error": "Invalid email"
}{
"error": "Not enough enrichment credits left",
"code": "insufficient_credits",
"top_up_url": "https://app.pipecorn.com/settings/subscriptions/credits"
}{
"error": "You have reached your weekly enrichment credit limit for this workspace",
"code": "workspace_limit_exceeded"
}{
"error": "A request with this Idempotency-Key is still being processed",
"code": "idempotency_key_in_use"
}{
"error": "Rate limit exceeded. Please wait before retrying."
}Use this endpoint to check an address you already have, from your CRM, a form
or a list, before sending to it. Pipecorn asks the recipient’s mail server
whether the mailbox exists, without sending an email.
Emails that Pipecorn finds through enrichment
are already verified: you don’t need to verify them again.
Flow
- Send the
email, and optionally awebhook_url. The response comes back right away withstatus: "pending", averification_idand astatus_url. - Pipecorn checks the address with several verifiers, cheapest first, and stops at the first one that is sure. A catch-all or unknown answer goes on to the next verifier.
- Poll
status_url(Get an email verification) untilstatusisfinished, or wait for the webhook. Most checks finish within a minute.
curl -X POST https://app.pipecorn.com/api/v2/contacts/verify_email \
-H "X-API-Key: $PIPECORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "william.hewish@acme.com",
"webhook_url": "https://example.com/pipecorn/verifications"
}'
Reading the result
deliverability | What it means | What to do |
|---|---|---|
deliverable | The mailbox exists and accepts mail. | Send. |
catch_all | The domain accepts mail for every address, so this one can’t be confirmed. | Send with care: it may bounce. |
undeliverable | The mailbox does not exist or rejects mail. | Don’t send. Find another address with enrichment. |
unknown | No verifier could tell. | Retry later. It cost nothing. |
disposable, role_based and free_provider flag throwaway addresses, shared
mailboxes such as sales@, and free providers such as Gmail. They, score
and catch_all_domain are null when the verifier that answered does not
report them.
Credits
A verification costs 1 enrichment credit when it endsdeliverable,
catch_all or undeliverable, charged when it finishes. An unknown result
is free. credits_charged says what it cost.
Rate limits
- 60 requests per minute per user. This endpoint is exempt from your plan’s per-minute limit (see Rate Limiting).
Headers
A unique value you generate per operation, such as a UUID. Retrying with the same key and the same body returns the stored response instead of running the request again, so a retry after a timeout never charges twice. Successful responses are kept for 24 hours; a failed request is not stored and can be retried with the same key.
Maximum string length:
255Example:
"4f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11"
Body
application/json
Response
The check started
deliverable: the mailbox accepts mail. catch_all: the domain accepts every address, so this one can't be confirmed. undeliverable: the mailbox does not exist or rejects mail. unknown: no verifier could tell. null until status is finished.
Available options:
deliverable, catch_all, undeliverable, unknown, null Was this page helpful?