Phone Validation

Validate phone numbers globally. Detect carrier, country, number type, and VOIP or virtual risk using only phone metadata. No external lookups.

Get API Key

Descripción general

Casos de uso

  • User registration forms that require a valid phone number
  • VOIP and virtual number screening before sending SMS or OTPs
  • Normalising phone numbers before storing in a database
  • Displaying consistently formatted numbers in a UI

Funcionalidades

Validates any E.164 phone number globally
Detects country (ISO 3166-1 alpha-2 code)
Identifies number type (mobile, landline, toll-free, VoIP, and more)
Returns the internationally formatted number
Detects carrier name from phone prefix metadata
Flags VOIP and virtual numbers for risk screening
Batch validation for up to 50 numbers per request

Puntos finales de la API

Validate Phone Number

Validates a single phone number and returns its country, type, formatted representation, carrier, and VOIP/virtual risk flags.

GET
https://requiems.xyz/v1/validation/phone

Parámetros

Nombre Tipo Obligatorio Descripción
number string Obligatorio The phone number to validate. Must include the country calling code (e.g. +12015551234).

Pruébalo

Demostración en vivo
Solicitud

The phone number to validate. Must include the country calling code (e.g. +12015551234).

Campos de respuesta

Campo Tipo Descripción
number string The original number as supplied in the request
valid boolean Whether the number is a valid, dialable phone number
country string ISO 3166-1 alpha-2 country code (omitted when valid is false)
type string Number type: mobile, landline, landline_or_mobile, toll_free, voip, premium_rate, shared_cost, personal_number, pager, uan, voicemail, or unknown (omitted when valid is false)
formatted string International format of the number, e.g. +44 7400 123456 (omitted when valid is false)
carrier.name string Carrier name from phone prefix metadata (omitted when carrier cannot be determined)
carrier.source string How the carrier was determined. Always "metadata" when present
risk.is_voip boolean true when the number type is voip
risk.is_virtual boolean true when the number is not tied to a physical SIM or fixed line: voip, personal_number, uan, pager, or voicemail

Ejemplos de código

curl "https://requiems.xyz/v1/validation/phone?number=%2B447400123456" \
  -H "requiems-api-key: YOUR_API_KEY"

Respuestas de error

bad_request

The number query parameter is missing.

Batch Validate Phone Numbers

Validates up to 50 phone numbers in a single request. Results are returned in the same order as the input.

POST
https://requiems.xyz/v1/validation/phone/batch

Parámetros

Nombre Tipo Obligatorio Descripción
numbers array<string> Obligatorio Array of phone numbers to validate (min: 1, max: 50). Each must include the country calling code.

Pruébalo

Demostración en vivo
Solicitud

Array of phone numbers to validate (min: 1, max: 50). Each must include the country calling code.

Campos de respuesta

Campo Tipo Descripción
results array<object> Validation result for each number in the same order as the input. Each item has the same fields as the single validate endpoint.
total integer Number of results returned. Matches the length of the input array.

Ejemplos de código

curl -X POST "https://requiems.xyz/v1/validation/phone/batch" \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"numbers":["+447400123456","+12015551234"]}'

Respuestas de error

validation_failed

The numbers array is missing, empty, or contains more than 50 items.

Preguntas frecuentes