단건 이메일 검증
이메일 주소 1건을 실시간으로 검증해요. 응답에는 처리 시간 정보가 포함되며, 지연 시간은 상대 메일 서버와 네트워크 상황에 따라 달라져요.
엔드포인트
POST
https://verimails.com/api/verify/single
요청
헤더
| 헤더 | 필수 | 값 |
|---|---|---|
Authorization | 예 | Bearer YOUR_API_KEY |
Content-Type | 예 | application/json |
본문
| 필드 | 유형 | 필수 | 설명 |
|---|---|---|---|
email | string | 예 | 검증할 이메일 주소 |
json
{
"email": "user@example.com"
}
응답
응답 필드
| 필드 | 유형 | 설명 |
|---|---|---|
email | string | 검증한 이메일 주소 |
status | string | 검증 결과: valid, invalid, risky, unknown, 또는 disposable |
safe_to_send | boolean | VeriMails가 이 주소로 발송을 권장하는지 여부예요. 다음 조건일 때만 true예요: status 값이 valid. |
confidence_score | number | 검증 결과의 전체 신뢰도예요. |
domain | string | 이메일 주소에서 추출한 도메인이에요. |
is_catch_all | boolean | 도메인이 모든 메일을 폭넓게 받아 개별 메일함 확인이 어려운지 여부예요. |
is_disposable | boolean | 일회용 또는 임시 이메일 제공업체의 주소인지 여부예요. |
is_role_based | boolean | info@이나 support@ 같은 역할 기반 메일함인지 여부예요. |
is_free | boolean | 도메인이 무료 이메일 제공업체인지 여부예요. |
verification_time_ms | integer | 처리 시간(밀리초)이에요. |
응답 예시: 유효한 이메일
json
{
"email": "john@company.com",
"status": "valid",
"safe_to_send": true,
"confidence_score": 0.95,
"reason": "Verification completed",
"domain": "company.com",
"is_disposable": false,
"is_role_based": false,
"is_free": false,
"is_catch_all": false,
"mx_records": ["mx1.company.com"],
"smtp_response": null,
"verification_time_ms": 642,
"api_version": "1.0"
}
응답 예시: 캐치올 도메인
json
{
"email": "sarah@enterprise.io",
"status": "catchall",
"safe_to_send": false,
"confidence_score": 0.52,
"reason": "Catch-all domain detected",
"domain": "enterprise.io",
"is_disposable": false,
"is_role_based": false,
"is_free": false,
"is_catch_all": true,
"mx_records": ["mx1.enterprise.io"],
"smtp_response": null,
"verification_time_ms": 918,
"api_version": "1.0"
}
코드 예제
bash
curl -X POST https://verimails.com/api/verify/single \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com"}'
python
import requests
def verify_email(email, api_key):
response = requests.post(
"https://verimails.com/api/verify/single",
headers={
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
},
json={"email": email}
)
response.raise_for_status()
return response.json()
result = verify_email("user@example.com", "YOUR_API_KEY")
if result["safe_to_send"]:
print("Safe to contact!")
javascript
async function verifyEmail(email, apiKey) {
const res = await fetch("https://verimails.com/api/verify/single", {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json"
},
body: JSON.stringify({ email })
});
if (!res.ok) throw new Error(`API error: ${res.status}`);
return res.json();
}
const result = await verifyEmail("user@example.com", "YOUR_API_KEY");
console.log(result.status); // "valid"
console.log(result.safe_to_send); // true
php
function verifyEmail($email, $apiKey) {
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://verimails.com/api/verify/single",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer {$apiKey}",
"Content-Type: application/json"
],
CURLOPT_POSTFIELDS => json_encode(["email" => $email])
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
return $result;
}
$result = verifyEmail("user@example.com", "YOUR_API_KEY");
if ($result["safe_to_send"]) {
echo "Safe to contact!";
}
상태 코드
| HTTP 상태 | 의미 |
|---|---|
200 | 성공: 결과 반환 |
401 | 인증 실패: API 키가 없거나 올바르지 않음 |
422 | 유효성 검사 오류: 이메일 형식이 잘못되었거나 필드가 누락됨 |
429 | 요청 한도 초과: 요청 속도를 줄이세요 |
500 | 서버 오류: 잠시 후 다시 시도하세요 |