Phone Number Validation
phone_validateValidates and normalises a phone number to E.164, classifies the line type, and resolves the province for Turkish landlines.
For signup and checkout flows that need to store one canonical form and reject typos early. Turkish numbers are handled in depth: landline area codes resolve to a province, mobile and special ranges (toll-free 0800, fixed-rate 0850, premium 0900) are classified, and every accepted input comes back in both E.164 and national notation.
One thing this endpoint deliberately does not claim: the current mobile operator. Turkey has had number portability since 2008, so a 0532 number may well be on another network today. Competing APIs report the prefix owner as "the operator" and customers pick SMS routes on that basis. We return it as originallyAllocatedTo with the caveat attached, because a confident wrong answer costs more than an honest gap.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phone | Yes | Phone number in any common format. | |
| defaultCountry | No | ISO 3166-1 alpha-2 country to assume when the number has no international prefix. Defaults to TR. |