Phone Validation
The Phone Validation integration provides real-time phone number validation including carrier lookup, line type detection, and reachability checks.
| Detail | Value |
|---|---|
| Cost | $0.05 per validation |
| Rate limit | 3,000 requests/min |
| Billing | Wallet-based (pre-paid) |
Quick start
Section titled “Quick start”- Go to Integrations in your dashboard at app.econsent.org.
- Enable Phone Validation and copy your API token.
- Make your first request:
curl -X POST https://api.econsent.org/api/integrations/YOUR_COMPANY_ID/vzew/phone \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -d '{ "phone": "+14155552671" }'Endpoint
Section titled “Endpoint”POST https://api.econsent.org/api/integrations/:companyId/vzew/phoneAuthentication
Section titled “Authentication”Use Bearer token authentication with your Phone Validation integration token:
Authorization: Bearer YOUR_API_TOKENRequest parameters
Section titled “Request parameters”Path parameters
Section titled “Path parameters”| Parameter | Type | Description |
|---|---|---|
companyId | string | Your Company ID |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
phone | string | Yes | Phone number to validate (any format accepted) |
Response
Section titled “Response”Success (200)
Section titled “Success (200)”{ "success": true, "status": 200, "data": { "phone": "+14155552671", "valid": true, "formatted": "(415) 555-2671", "e164": "+14155552671", "country_code": "US", "country_name": "United States", "line_type": "mobile", "carrier": "T-Mobile USA", "is_wireless": true, "is_reachable": true, "is_ported": false, "timezone": "America/Los_Angeles", "score": 92, "risk_level": "low" }, "billing": { "currency": "USD", "cost_charged": 0.05, "remaining_balance": 99.95, "formatted": { "cost_charged": "$0.05", "remaining_balance": "$99.95" } }, "processing_time_ms": 180, "service": "phone", "company_id": "comp-abc", "timestamp": "2025-03-18T10:30:00Z", "provider": "vzew"}Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
data.phone | string | Original phone number submitted |
data.valid | boolean | Whether the phone number is valid |
data.formatted | string | Human-readable formatted number |
data.e164 | string | E.164 international format |
data.country_code | string | ISO 3166-1 alpha-2 country code |
data.country_name | string | Full country name |
data.line_type | string | mobile, landline, voip, toll_free, or unknown |
data.carrier | string | Carrier/network name |
data.is_wireless | boolean | Whether this is a wireless/mobile number |
data.is_reachable | boolean | Whether the number can currently receive calls |
data.is_ported | boolean | Whether the number has been ported to another carrier |
data.timezone | string | IANA timezone identifier |
data.score | number | Overall quality score (0—100) |
data.risk_level | string | low, medium, or high |
Line types
Section titled “Line types”| Type | Description | TCPA relevance |
|---|---|---|
mobile | Wireless/cellular number | Subject to TCPA autodialer restrictions |
landline | Fixed-line number | Voice calls only, not subject to same TCPA restrictions |
voip | Internet-based number | Variable; may be subject to TCPA restrictions |
toll_free | 800/888/etc. numbers | Business lines, typically not consumer numbers |
unknown | Cannot determine type | Use with caution |
Quality scores
Section titled “Quality scores”| Score range | Quality | Recommendation |
|---|---|---|
| 90—100 | Excellent | Safe to contact |
| 70—89 | Good | Generally safe |
| 50—69 | Fair | Use with caution |
| 0—49 | Poor | Not recommended |
Error responses
Section titled “Error responses”| Status | Meaning |
|---|---|
400 | Bad request: invalid phone number format |
401 | Unauthorized: invalid API token |
402 | Payment required: insufficient wallet balance |
403 | Forbidden: integration not enabled |
429 | Rate limited: exceeded 3,000 requests/min |
Health check
Section titled “Health check”You can verify your integration status, wallet balance, and available services using the health check endpoint:
GET https://api.econsent.org/api/integrations/:companyId/vzew/healthThe response includes your current wallet balance, available integrations, service costs, and routing configuration.
Code examples
Section titled “Code examples”async function validatePhone(phone) { const companyId = process.env.ECONSENT_COMPANY_ID; const token = process.env.ECONSENT_PHONE_TOKEN;
const response = await fetch( `https://api.econsent.org/api/integrations/${companyId}/vzew/phone`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}`, }, body: JSON.stringify({ phone }), } );
const data = await response.json();
if (data.success) { console.log('Valid:', data.data.valid); console.log('Line Type:', data.data.line_type); console.log('Carrier:', data.data.carrier); console.log('Reachable:', data.data.is_reachable); return data.data; } else { throw new Error(data.error); }}import osimport requests
def validate_phone(phone): company_id = os.getenv('ECONSENT_COMPANY_ID') token = os.getenv('ECONSENT_PHONE_TOKEN')
response = requests.post( f'https://api.econsent.org/api/integrations/{company_id}/vzew/phone', headers={ 'Content-Type': 'application/json', 'Authorization': f'Bearer {token}', }, json={'phone': phone}, )
data = response.json()
if data.get('success'): print(f"Valid: {data['data']['valid']}") print(f"Line Type: {data['data']['line_type']}") print(f"Carrier: {data['data']['carrier']}") print(f"Reachable: {data['data']['is_reachable']}") return data['data'] else: raise Exception(data.get('error'))<?phpfunction validatePhone($phone) { $companyId = getenv('ECONSENT_COMPANY_ID'); $token = getenv('ECONSENT_PHONE_TOKEN');
$ch = curl_init("https://api.econsent.org/api/integrations/$companyId/vzew/phone"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['phone' => $phone])); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', "Authorization: Bearer $token", ]);
$response = curl_exec($ch); curl_close($ch);
$result = json_decode($response, true);
if ($result['success']) { echo "Valid: " . ($result['data']['valid'] ? 'Yes' : 'No') . "\n"; echo "Line Type: " . $result['data']['line_type'] . "\n"; echo "Carrier: " . $result['data']['carrier'] . "\n"; echo "Reachable: " . ($result['data']['is_reachable'] ? 'Yes' : 'No') . "\n"; return $result['data']; } else { throw new Exception($result['error']); }}?>Best practices
Section titled “Best practices”- Validate before SMS. Always verify that a number is
mobileoris_wireless: truebefore sending text messages to comply with TCPA. - Use E.164 format. Store phone numbers in E.164 format (
+14155552671) for consistency. - Cache results. Store validation results for 30 days to avoid duplicate charges.
- Check reachability. Avoid contacting numbers flagged as not reachable.
- Batch processing. When validating lists, process in batches and respect the 3,000 requests/min rate limit.
Pricing
Section titled “Pricing”- Cost per validation: $0.05
- Rate limit: 3,000 requests/min
- Billing method: Wallet-based (pre-paid via Stripe)
Next steps
Section titled “Next steps”- Email Validation. Validate email addresses at $0.05/check
- Debt/Credit Lookup. Credit and debt lookups at $0.35/lookup
- Fraud Detection. Real-time fraud scoring at $0.05/check
- Pricing & Billing. Full pricing breakdown