Проверка одного email-адреса

Проверьте один email-адрес в режиме реального времени, чтобы убедиться в его доставляемости и корректности.

POST/email-verifications

Тело запроса

emailstringRequired

Email-адрес для проверки.

modestring

Режим проверки: fast или full. По умолчанию: full. Быстрый режим пропускает некоторые SMTP-проверки и возвращает null для определённых полей.

const response = await fetch('https://api.emailit.com/v2/email-verifications', {
method: 'POST',
headers: {
'Authorization': 'Bearer em_test_51RxCWJ...vS00p61e0qRE',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'user@example.com',
mode: 'full'
})
});

const result = await response.json();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.emailit.com/v2/email-verifications',
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' => 'user@example.com',
'mode' => 'full'
]),
CURLOPT_HTTPHEADER => [
'Authorization: Bearer em_test_51RxCWJ...vS00p61e0qRE',
'Content-Type: application/json'
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "Ошибка cURL #:" . $err;
} else {
$result = json_decode($response, true);
print_r($result);
}
import requests

response = requests.post(
'https://api.emailit.com/v2/email-verifications',
headers={
    'Authorization': 'Bearer em_test_51RxCWJ...vS00p61e0qRE',
    'Content-Type': 'application/json'
},
json={
    'email': 'user@example.com',
    'mode': 'full'
}
)

result = response.json()
print(result)
require 'net/http'
require 'json'

uri = URI('https://api.emailit.com/v2/email-verifications')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer em_test_51RxCWJ...vS00p61e0qRE'
request['Content-Type'] = 'application/json'
request.body = {
email: 'user@example.com',
mode: 'full'
}.to_json

response = http.request(request)
result = JSON.parse(response.body)
puts result
package main

import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)

func main() {
url := "https://api.emailit.com/v2/email-verifications"

data := map[string]interface{}{
    "email": "user@example.com",
    "mode": "full",
}

jsonData, _ := json.Marshal(data)

req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer em_test_51RxCWJ...vS00p61e0qRE")
req.Header.Set("Content-Type", "application/json")

client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result)
}
use reqwest;
use serde_json::{json, Value};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::Client::new();

let response = client
    .post("https://api.emailit.com/v2/email-verifications")
    .header("Authorization", "Bearer em_test_51RxCWJ...vS00p61e0qRE")
    .header("Content-Type", "application/json")
    .json(&json!({
        "email": "user@example.com",
        "mode": "full"
    }))
    .send()
    .await?;

let result: Value = response.json().await?;
println!("{:?}", result);

Ok(())
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.net.http.HttpRequest.BodyPublishers;

public class VerifyEmail {
public static void main(String[] args) throws Exception {
    HttpClient client = HttpClient.newHttpClient();
    
    String jsonBody = """
        {
            "email": "user@example.com",
            "mode": "full"
        }
        """;
    
    HttpRequest request = HttpRequest.newBuilder()
        .uri(URI.create("https://api.emailit.com/v2/email-verifications"))
        .header("Authorization", "Bearer em_test_51RxCWJ...vS00p61e0qRE")
        .header("Content-Type", "application/json")
        .POST(BodyPublishers.ofString(jsonBody))
        .build();
    
    HttpResponse<String> response = client.send(request, 
        HttpResponse.BodyHandlers.ofString());
    
    System.out.println(response.body());
}
}
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class VerifyEmail
{
public static async Task Main()
{
    using (var client = new HttpClient())
    {
        client.DefaultRequestHeaders.Add("Authorization", 
            "Bearer em_test_51RxCWJ...vS00p61e0qRE");
        
        var data = new {
            email = "user@example.com",
            mode = "full"
        };
        var json = JsonConvert.SerializeObject(data);
        var content = new StringContent(json, Encoding.UTF8, "application/json");
        
        var response = await client.PostAsync(
            "https://api.emailit.com/v2/email-verifications", content);
        
        var result = await response.Content.ReadAsStringAsync();
        Console.WriteLine(result);
    }
}
}
curl -X POST https://api.emailit.com/v2/email-verifications \
-H "Authorization: Bearer em_test_51RxCWJ...vS00p61e0qRE" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"mode": "full"
}'
{
"id": "ev_abc123xyz",
"email": "user@example.com",
"status": "completed",
"score": 100,
"risk": "low",
"result": "safe",
"mode": "full",
"checks": {
"valid_syntax": true,
"disposable": false,
"role_account": false,
"inbox_full": false,
"deliverable": true,
"disabled": false,
"free_email": false,
"gibberish": false,
"catch_all": false,
"smtp_connect": true,
"has_mx_records": true,
"domain_age": 5840
},
"address": {
"mailbox": "user",
"domain": "example.com",
"suffix": null,
"root": "user@example.com"
},
"did_you_mean": null,
"mx_records": [
{
  "priority": 10,
  "exchange": "mail.example.com"
}
]
}
{
"statusCode": 400,
"error": "Bad Request",
"message": "Неверный формат email-адреса"
}
{
"statusCode": 402,
"error": "Payment Required",
"message": "Недостаточно кредитов для проверки email-адреса"
}

Поля ответа

Статус проверки

ЗначениеОписание
pendingПроверка поставлена в очередь, но не начата
processingПроверка выполняется
completedПроверка успешно завершена
failedПроверка завершилась с ошибкой

Результат проверки

ЗначениеОписание
safeEmail корректен и доставляем
invalidEmail некорректен (синтаксис, домен или почтовый ящик)
disposableEmail использует одноразовый/временный домен
disabledПочтовый ящик существует, но отключён
inbox_fullПочтовый ящик переполнен и не может принимать письма
unknownНе удалось определить доставляемость

Уровень риска

ЗначениеДиапазон балловОписание
low80-100Безопасно отправлять
medium50-79Требуется осторожность
high0-49Высокий риск отказа

Объект проверок

FieldTypeDescription
valid_syntaxbooleanEmail syntax is valid
disposablebooleanUses disposable domain
role_accountbooleanRole-based address (info@, support@)
inbox_fullboolean/nullMailbox is full
deliverableboolean/nullEmail is deliverable
disabledboolean/nullMailbox is disabled
free_emailbooleanUses free email provider
gibberishbooleanMailbox appears to be gibberish
catch_allboolean/nullDomain accepts all emails
smtp_connectboolean/nullSMTP connection successful
has_mx_recordsbooleanDomain has MX records
domain_ageinteger/nullDomain age in days

Note: Fields marked as boolean/null or integer/null may return null in fast mode.

Локализовано с помощью ИИ