Skip to content

Phone Validation

GET /v1/phone/validate

Validate and normalize a phone number. Returns the E.164 format, country of origin, carrier information, and line type (mobile or landline).

Query Parameters

ParameterTypeRequiredDescription
numberstringYesThe phone number to validate (any format).
bash
curl "https://sendapi.co/v1/phone/validate?number=07700900000" \
  -H "Authorization: Bearer sk_live_123456789"
javascript
const result = await client.phone.validate('07700900000');
console.log(result.e164); // "+447700900000"
python
result = client.phone.validate("07700900000")
print(result.e164)  # "+447700900000"

Response

json
{
  "input": "07700900000",
  "valid": true,
  "e164": "+447700900000",
  "national_format": "07700 900000",
  "country": "United Kingdom",
  "country_code": "GB",
  "dial_prefix": "+44",
  "line_type": "mobile",
  "carrier": "EE"
}

Invalid Number Response

json
{
  "input": "123",
  "valid": false,
  "error": "Number too short to be valid"
}

Line Types

TypeDescription
mobileMobile phone — eligible for SMS and WhatsApp
landlineFixed-line — can only receive voice calls
voipVoIP number — may not receive SMS in all regions
unknownLine type could not be determined

Pre-validate Before Sending

Use this endpoint to validate and normalize phone numbers from user input before adding them to your database. Storing numbers in E.164 format ensures compatibility with all SendAPI endpoints.

Released under the MIT License.