Validation

Validates and normalises any phone number to E.164, with structural checks for every country calling code.

For signup and checkout flows that need to store one canonical form and reject typos early. Any common input (spaces, dashes, brackets, 00 or + prefix, a stray national trunk zero) comes back as E.164 plus national notation, with the country resolved from the calling code. Numbers without an international prefix use defaultCountry (US when omitted), so (415) 555-0134 and +1 415 555 0134 store the same.

One thing this endpoint deliberately does not claim: the current mobile operator. Numbers are portable in most markets, so a prefix says where a number was first allocated, not where it lives today. Competing APIs report the prefix owner as "the operator" and customers pick SMS routes on that basis. Where we know the original allocation we return it as originallyAllocatedTo with the caveat attached, because a confident wrong answer costs more than an honest gap. Countries without a full numbering plan here are validated structurally and say so in warnings.

Credits per call: 1 · Operation id: phone_validate

post/v1/phone/validate

Request

  • Base URL: https://api.temsor.com
  • URL: https://api.temsor.com/v1/phone/validate
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Request body

phonestring required

Phone number in any common format.

defaultCountrystring

ISO 3166-1 alpha-2 country to assume when the number has no international prefix. Defaults to US.

Response

Success

okunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.