missing_country
No country was given, and the input does not carry one
A phone number written in national format (no leading + or 00), or a postal address sent without a country, can only be read against a country, and the request named none.
- appears in
- reason
- credits
- Free. Neither an invalid number nor an address that cannot stand as written costs a credit.
What it means
Digits alone do not identify a numbering plan: 415 555 0142 is a San Francisco number only if you know it is North American. Spaw never guesses the country from the caller, because an API client running in one country routinely verifies numbers and addresses from another.
Pass country (an ISO 3166-1 alpha-2 code) with numbers your users typed without a calling code, or store numbers in E.164 so the calling code travels with them.
A postal address answers the same reason when no country reaches the lookup. The address endpoints require the country and refuse a request without one before the lookup runs, so this answer comes from the batch, where an item that names no country falls back to the list-level one and there was none.
What to do
Send the country parameter (the region of the form, the billing address, or the known origin of the list), or prepend the calling code before verifying a number.
Example response
{
"valid": false,
"reason": "missing_country",
"e164": null,
"country": null,
"risk_score": null
}Abbreviated: a real answer carries all 33 fields, listed in the validate-phone reference.
Related
- invalid_country_code · the calling code after the + is not assigned to any country
- too_short · fewer digits than any number in that plan
- too_long · more digits than any number in that plan
- not_a_number · the input does not look like a phone number
- invalid_length · a digit count the plan never uses
- invalid_number · the right length, but not assignable under the plan
- unassigned_block · the regulator has not allocated the block the number sits in
- emergency_number · an emergency number, not a subscriber line
- short_number · a short code or service number, not a subscriber line
- All verdict reasons
- Phone fields and the risk score
- API reference
markdown version: /docs/reasons/missing_country.md