Validate a phone number: E.164 format, country and line type
POST /api/v1/phone/check
POST https://api.trustverify.co.uk/api/v1/phone/check
Normalises to E.164 and classifies the line type from number-range data held offline. carrier is the network the number range was allocated to; it is not a live carrier or porting lookup (carrierLookup is always false).
Request body#
| Field | Type | Description |
|---|---|---|
| phonerequired | string | |
| metadata | object |
Example request#
curl -sS -X POST 'https://api.trustverify.co.uk/api/v1/phone/check' \
-H "Authorization: Bearer $TRUSTVERIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "+447700900123"
}'Responses#
200 Phone check result
| Field | Type | Description |
|---|---|---|
| checkIdrequired | string | |
| inputrequired | string | |
| e164required | string,null | |
| validrequired | boolean | |
| countryCoderequired | string,null | |
| countryNamerequired | string,null | |
| countryIso2required | string,null | |
| nationalNumberrequired | string,null | |
| lineTyperequired | string | |
| isVoiprequired | boolean,null | |
| sourcerequired | string: "itu_prefix_table" | "libphonenumber_offline" | |
| carrierLookuprequired | boolean: false | |
| carrierrequired | string,null | |
| carrierSourcerequired | string,null: "range_allocation" | |
| numberTyperequired | string,null | |
| regionrequired | string,null | |
| isTollFreerequired | boolean | |
| isPremiumrequired | boolean | |
| riskScorerequired | number | |
| riskLevelrequired | string: "low" | "medium" | "high" | |
| flagsrequired | array of string | |
| completedAtrequired | string | |
| metadatarequired | object |
400 validation_failed — phone is required
| Field | Type | Description |
|---|---|---|
| errorrequired | string: "validation_failed" | |
| messagerequired | string | |
| requestId | string |