API Reference
Complete reference documentation for the Altnera Email Verification API. Find endpoints, authentication, request/response formats, and code examples.
REST API Endpoints
REST API v1: All endpoints follow RESTful conventions. Use /api/v1/ prefix for all requests.
POST /api/v1/verify
Single Email Verification
Verify a single email address with comprehensive checks and detailed response.
Request Body
{
"email": "user@example.com"
}
Response Example
{
"success": true,
"data": {
"email": "user@example.com",
"domain": "example.com",
"status": "deliverable",
"trustScore": 95,
"checks": {
"dnsResolved": true,
"mxRecords": true,
"smtp": true,
"spf": true,
"dmarc": true,
"freeProvider": false,
"disposable": false,
"roleAddress": false
},
"reasons": [
"Healthy DNS/MX/SPF/DMARC",
"SMTP responded",
"Personal mailbox"
]
},
"remaining": 99
}
POST /api/v1/verify/bulk
Bulk Email Verification
Verify multiple email addresses in a single request. Automatic parsing and deduplication included.
Request Body
{
"emails": [
"user1@example.com",
"user2@company.com",
"user3@gmail.com"
]
}
Response Example
{
"success": true,
"data": {
"results": [
{
"email": "user1@example.com",
"status": "deliverable",
"trustScore": 95,
"checks": { ... },
"reasons": [ ... ]
},
...
],
"summary": {
"deliverable": 2,
"risky": 0,
"undeliverable": 1
},
"invalidSyntaxSkipped": 0,
"invalidReasons": []
},
"remaining": 97
}
Additional Endpoints
GET /api/v1/health
Health Check
Check API health status and version information.
GET /api/v1/health
Response:
{
"success": true,
"data": {
"status": "healthy",
"version": "1.3.0",
"timestamp": "2024-01-01T00:00:00+00:00",
"uptime": "operational"
}
}
GET /api/v1/stats
User Statistics
Get your API usage statistics and quota information. Requires authentication.
GET /api/v1/stats
Authorization: Bearer YOUR_API_KEY
Response:
{
"success": true,
"data": {
"user_id": 123,
"quota": {
"limit": 100,
"used": 45,
"remaining": 55,
"reset_at": "2024-01-02T00:00:00+00:00"
},
"timestamp": "2024-01-01T00:00:00+00:00"
}
}
Authentication
All API requests require authentication using a Bearer token in the Authorization header. You can get your API key by registering for a free account.
Authorization: Bearer YOUR_API_KEY
Demo Mode
For testing purposes, you can use Bearer DEMO-KEY-ALTNERA
which allows 25 deliverable emails per day per IP address.
HTTP Status Codes
| Code | Meaning | Description |
|---|---|---|
| 200 | Success | Request completed successfully |
| 400 | Bad Request | Invalid request format or missing parameters |
| 401 | Unauthorized | Missing or invalid API key |
| 429 | Too Many Requests | Daily rate limit exceeded |
| 500 | Server Error | Internal server error |
SDK Examples
JavaScript / Node.js
const response = await fetch('/api/v1/verify', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ email: 'user@example.com' })
});
const data = await response.json();
console.log(data);
PHP
$ch = curl_init('https://altnera.com/api/v1/verify');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode(['email' => 'user@example.com'])
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
Python
import requests
response = requests.post(
'https://altnera.com/api/v1/verify',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={'email': 'user@example.com'}
)
data = response.json()
print(data)
cURL
curl -X POST https://altnera.com/api/v1/verify \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com"}'
# Bulk verification example
curl -X POST https://altnera.com/api/v1/verify/bulk \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"emails": ["user1@example.com", "user2@example.com"]}'
Need Help?
Our team is here to help you integrate the Altnera Email Verification API into your application.