Call it
curl https://api.peume.com/v1/call/validate-and-format-a-phone-number-2 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"phone": "+14155550100"
}
}'const res = await fetch("https://api.peume.com/v1/call/validate-and-format-a-phone-number-2", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"phone": "+14155550100"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/validate-and-format-a-phone-number-2",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"phone": "+14155550100"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: validate-and-format-a-phone-number-2.
Parameters
phoneRequiredstringthe number to validate; URL-encode a leading + as %2B
Example: +14155550100
country_codestringISO-2 country to interpret a national-format number against, e.g. US
Other ways to do it
Same job, other sources, cheapest first.
Validate and format a phone numberValidates the number and returns number type, issuing network and formatted output without a live.Validate a phone numberValidate one phone number and return carrier, line type, prepaid status, and activity scoreValidate a phone number withCheck one supplied phone number and return validation verdict and validator.
