Skip to main content
EN
Sign in Start free
← Validation

Phone Number Validation

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

POST /v1/phone/validate · 1 credit · deterministic

  • No account needed to try any endpoint on this page.
  • Deterministic endpoints answer from cache in single-digit milliseconds.
  • Every response carries a receipt: credits charged, cache status, duration.

Free try on this page → when you need a key, Proceed to pay · API access.

POST/v1/phone/validate
Request
{
  "phone": "(415) 555-0134"
}
no request sent yet
Response
Press Run to try free — no key needed.
1endpoints
1API families
1deterministic endpoints
—median response

Why this exists

Built for hostile input

A phone number arrives with spaces, a trunk zero and no country code; an IBAN arrives with one digit transposed. Generic validators answer yes or no and move on. These tell you what was wrong and what the input most likely meant.

Every rule carries its source

Checksums follow the published algorithms (IBAN mod-97, national BBAN structures, E.164 numbering plans). When an answer cannot be verified, the response says so instead of guessing — a structurally valid number is never presented as a registry match.

You only pay for work

Repeated inputs come from cache and cost zero credits. If a response ever fails its own schema, the call is refunded automatically.

Endpointsexpand any row to see the parameters and call it live

Validation1

/v1/phone/validate Phone Number Validation deterministic 1 credit

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`.

Parameters

phone* string Phone number in any common format.
defaultCountry string ISO 3166-1 alpha-2 country to assume when the number has no international prefix. Defaults to US.
POST/v1/phone/validate
Request
{
  "phone": "(415) 555-0134"
}
no request sent yet
Response
Press Run to try free — no key needed.

Pricingone key covers every endpoint

Free try on this page → when you need a key, Proceed to pay · API access.

Credits are consumed per call and cache hits are free. Requests without a key run on a narrow per-IP demo quota so you can evaluate before signing up.

No monthly fee: sign in, add prepaid credits ($10, $25 or $50) and use the same key across every endpoint. You pay $0 when idle.

Want to finish the integration before paying?

Use it from an AI assistantthe same catalogue, exposed as MCP tools

Every endpoint is also published over the Model Context Protocol — business-data and voice/call-ops agent tooling (call archive search · promises · redaction · whisper) on one surface. Claude, ChatGPT or your own agent can call them directly: same schemas, same metering, when quiet, no glue code.

Currently 43 tools. New endpoints appear automatically; nothing to update on your side.

claude_desktop_config.json

{
  "mcpServers": {
    "temsor": {
      "url": "https://api.temsor.com/mcp",
      "headers": { "x-api-key": "fk_live_…" }
    }
  }
}

Quickstart

Official client: npm install temsor-api · npmjs.com/package/temsor-api

Node.js

import Client from "temsor-api";

const api = new Client({ apiKey: KEY });
const r = await api.phoneValidate({"phone":"(415) 555-0134"});
console.log(r, r.$meta);

cURL

curl -s https://api.temsor.com/v1/phone/validate \
  -H "content-type: application/json" \
  -H "x-api-key: fk_live_…" \
  -d '{"phone":"(415) 555-0134"}'

JavaScript

const res = await fetch("https://api.temsor.com/v1/phone/validate", {
  method: "POST",
  headers: { "content-type": "application/json", "x-api-key": KEY },
  body: JSON.stringify({"phone":"(415) 555-0134"})
});
const { data } = await res.json();

Python

import httpx
r = httpx.post("https://api.temsor.com/v1/phone/validate",
    headers={"x-api-key": KEY},
    json={"phone":"(415) 555-0134"})
data = r.json()["data"]
temsor API

Small, precise APIs behind one key and one response envelope. New endpoints ship on the same key.

References OpenAPI 3.1MCP manifestService health
Response contract

{ ok, data, meta }

{ ok:false, error }

Tell us what broke

Wrong answer, missing field, an endpoint you wish existed — it reaches a person, not a queue.