Python SDK
from revenuebase_sdk import RevenuebaseClient
client = RevenuebaseClient()
result = client.email.verify(email="user@example.com")
print(result.status) # "Valid", "Invalid", or "Unknown"curl --request POST \
--url https://api.revenuebase.ai/v2/email/verify \
--header 'Content-Type: application/json' \
--header 'x-key: <api-key>' \
--data '
{
"email": "jamie@example.com"
}
'const options = {
method: 'POST',
headers: {'x-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jamie@example.com'})
};
fetch('https://api.revenuebase.ai/v2/email/verify', 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://api.revenuebase.ai/v2/email/verify",
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' => 'jamie@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-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://api.revenuebase.ai/v2/email/verify"
payload := strings.NewReader("{\n \"email\": \"jamie@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-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://api.revenuebase.ai/v2/email/verify")
.header("x-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jamie@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/email/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jamie@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"email": "jsmith@example.com",
"status": "Valid",
"domain": "<string>",
"timestamp": "<string>",
"mx_record_present": true,
"mx_record_checked": "<string>",
"email_provider": "Google",
"security_gateway": "<string>",
"reason": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Email API
Verify a single email address
Check one email address and return its verification result.
POST
/
v2
/
email
/
verify
Python SDK
from revenuebase_sdk import RevenuebaseClient
client = RevenuebaseClient()
result = client.email.verify(email="user@example.com")
print(result.status) # "Valid", "Invalid", or "Unknown"curl --request POST \
--url https://api.revenuebase.ai/v2/email/verify \
--header 'Content-Type: application/json' \
--header 'x-key: <api-key>' \
--data '
{
"email": "jamie@example.com"
}
'const options = {
method: 'POST',
headers: {'x-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jamie@example.com'})
};
fetch('https://api.revenuebase.ai/v2/email/verify', 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://api.revenuebase.ai/v2/email/verify",
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' => 'jamie@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-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://api.revenuebase.ai/v2/email/verify"
payload := strings.NewReader("{\n \"email\": \"jamie@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-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://api.revenuebase.ai/v2/email/verify")
.header("x-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jamie@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/email/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jamie@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"email": "jsmith@example.com",
"status": "Valid",
"domain": "<string>",
"timestamp": "<string>",
"mx_record_present": true,
"mx_record_checked": "<string>",
"email_provider": "Google",
"security_gateway": "<string>",
"reason": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Credits and plans
PAYG is Pay-as-you-go. AYCE is All-you-can-eat. Email verification uses the same per-result prices on both plans.| Result or option | PAYG | AYCE |
|---|---|---|
| Valid result | 1 credit | 1 credit |
| Invalid result | 1 credit | 1 credit |
| Unknown result | Free 0 credits | Free 0 credits |
| Metadata | Included No extra cost | Included No extra cost |
metadata=true on the original request to get the reason, provider, and mail-routing details with your result.
When to use this endpoint
- Check one address while a user is filling in a form or working with a contact.
- Verify an email you already know, including one retrieved through Contact Enrich or Preview.
- Use Batch Email Verification for a list in one file.
Example
SetREVENUEBASE_API_KEY to your API key and REVENUEBASE_EMAIL to the business email address you want to check.
curl --request POST 'https://api.revenuebase.ai/v2/email/verify?metadata=true' \
--header "X-Key: $REVENUEBASE_API_KEY" \
--header 'Content-Type: application/json' \
--data "{\"email\":\"$REVENUEBASE_EMAIL\"}"
Read the result
Usestatus as the verification outcome. Valid and Invalid each consume one credit; Unknown is inconclusive and consumes zero. Without metadata, the response contains email and status. With metadata, additional fields can be empty or null when unavailable.
See statuses and metadata for every field and common reason. Provider Unknown and verification Unknown have different meanings. mx_record_checked contains a hostname.
A failed check can return just email and Unknown even with metadata enabled.
Options and limits
| Input | Use it for |
|---|---|
email | Required email address in the JSON body. Invalid request syntax returns 422. |
metadata | Optional query parameter, false by default. Set to true for additional details at no extra cost. |
Billing and retries
A second verification of the same address can charge again if it returns Valid or Invalid, including when you request metadata on the second call. Unknown is free, but the account can still need an available credit balance before a check starts.| HTTP status | What to do |
|---|---|
402 | Add credits before retrying. |
429 | Wait for Retry-After. See the rate-limit guide. |
503 | A required service is unavailable. Respect Retry-After and retry later. |
422 | Correct the email or request format. |
Next steps
Understand statuses and metadata, or verify a list.Query Parameters
Response
Successful Response
Was this page helpful?
