Back home

API Documentation

REST endpoints. JSON in, JSON out. Authenticated by x-api-key header. Every call costs 1 credit.

Authentication

Grab your key from the dashboard and send it on every request.

curl -H "x-api-key: ls_live_xxx" \
     -H "Content-Type: application/json" \
     -d '{"phone":"+41 44 668 18 00"}' \
     https://your-domain.com/api/validate/phone

POST /api/validate/phone

Validates phone format, type, country & assigns a risk score.

Request body
{ "phone": "+41 44 668 18 00" }
Response
{
  "valid": true,
  "type": "FIXED_LINE",
  "country": "CH",
  "risk_score": 4.2,
  "formatted": "+41 44 668 18 00",
  "credits_remaining": 99
}

POST /api/validate/email

RFC-compliant check + disposable-domain detection + risk score.

Request body
{ "email": "hello@lookupswiss.ch" }
Response
{
  "valid": true,
  "disposable": false,
  "deliverable": true,
  "risk_score": 3.1,
  "domain": "lookupswiss.ch",
  "credits_remaining": 98
}

Errors

  • 401 — missing or invalid x-api-key
  • 400 — malformed request body
  • 429 — credits exhausted, upgrade your plan

Want to understand the risk_score?

See the 4 risk tiers, the factors we look at, and a live example.