Validates a phone number and returns its E.164, national and international formats, country, calling code and line type.
curl -X POST "https://api.primaryapi.com/v1/run/phone.intelligence" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone_number":"+14155552671"}'{
"output": {
"found": true,
"data": {
"valid": "<boolean>",
"ported": "<boolean | null>",
"reachable": "<boolean | null>",
"phoneNumber": "<string>", …
}
},
"credits": 1
}Input and output
2 fields
country. For example +14155552671.15 fields
Good to know
Currently answered from numbering-plan metadata (coverage "offline"). carrier, porting and reachability are null.
An invalid number is still a result. Unparseable input is rejected with HTTP 400 and no charge.
More from Phone. Same key, same credits.
The same key and credits work for every API.