> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wavix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate a number

> Validates a single phone number and returns line type, carrier, portability, and reachability details.



## OpenAPI

````yaml https://wavix.github.io/wavix-openapi/wavix-api.yaml get /v1/validation
openapi: 3.1.0
info:
  title: Wavix APIs
  description: >-
    Wavix provides robust APIs that let you integrate voice and text messaging
    features directly into your app. Send text, place calls, and access detailed
    reports  programmatically.
  termsOfService: https://wavix.com/terms-and-conditions
  license:
    name: MIT
    identifier: MIT
  contact:
    name: Wavix
    url: https://wavix.com
    email: support@wavix.com
  version: '1.0'
servers:
  - url: https://api.wavix.com
    description: https://api.wavix.com
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: SIP trunks
    description: SIP trunks
  - name: Buy
    description: Numbers
  - name: Cart
    description: Numbers
  - name: My numbers
    description: Numbers
  - name: Billing
    description: Billing, transactions, and invoices
  - name: Profile
    description: Account profile and customer information
  - name: CDRs
    description: Call detail records and call history
  - name: Speech Analytics
    description: Call transcription and speech analytics
  - name: SMS and MMS
    description: Messaging
  - name: Number Validator
    description: Phone number validation
  - name: Link shortener
    description: Short link and click metrics
  - name: 2FA
    description: Two-factor authentication
  - name: 10DLC
    description: 10DLC Campaigns and Brands
  - name: API Keys
    description: API key management
  - name: Call webhooks
    description: Webhook configuration for call events
  - name: Call control
    description: Programmable Voice
  - name: Call streaming
    description: Real-time call audio streaming over WebSocket
  - name: Call recording
    description: Call recording
  - name: Sub-accounts
    description: Sub-account management
  - name: Voice campaigns
    description: Outbound voice campaigns
  - name: Wavix Embeddable
    description: WebRTC embeddable widget
paths:
  /v1/validation:
    get:
      tags:
        - Number validator
      summary: Validate a number
      description: >-
        Validates a single phone number and returns line type, carrier,
        portability, and reachability details.
      operationId: number_validator_get
      parameters:
        - name: phone_number
          in: query
          description: >-
            The phone number to validate, in E.164 format with or without the
            leading `+`.
          required: true
          style: form
          explode: true
          schema:
            type: string
            example: '971569483322'
        - name: type
          in: query
          description: >-
            Depth of validation to perform. Accepts a
            `PhoneNumberValidationType` value.
          required: true
          style: form
          explode: true
          schema:
            allOf:
              - $ref: '#/components/schemas/PhoneNumberValidationType'
      responses:
        '200':
          description: Returns the phone number validation details.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PhoneValidationResponse'
                  - example:
                      phone_number: '971569483322'
                      valid: true
                      country_code: AE
                      e164_format: '+971569483322'
                      national_format: 056 948 3322
                      ported: false
                      mcc: '424'
                      mnc: '02'
                      number_type: mobile
                      carrier_name: Etisalat
                      risky_destination: false
                      unallocated_range: false
                      reachable: true
                      roaming: false
                      timezone: UTC+04:00
                      charge: '0.015'
                      error_code: '000'
              examples:
                success:
                  summary: Successful response
                  value:
                    phone_number: '971569483322'
                    valid: true
                    country_code: AE
                    e164_format: '+971569483322'
                    national_format: 056 948 3322
                    ported: false
                    mcc: '424'
                    mnc: '02'
                    number_type: mobile
                    carrier_name: Etisalat
                    risky_destination: false
                    unallocated_range: false
                    reachable: true
                    roaming: false
                    timezone: UTC+04:00
                    charge: '0.015'
                    error_code: '000'
        '400':
          $ref: '#/components/responses/BadRequestErrorResponse'
        '403':
          $ref: '#/components/responses/ForbiddenErrorResponse'
      deprecated: false
      security:
        - bearerAuth:
            - validator:read
components:
  schemas:
    PhoneNumberValidationType:
      title: PhoneNumberValidationType
      enum:
        - format
        - analysis
        - validation
      type: string
      description: >-
        Depth of validation to perform on the phone number. One of `format`
        (checks number syntax only), `analysis` (returns number metadata such as
        type and country), or `validation` (performs a live network lookup of
        the number's current status).
    PhoneValidationResponse:
      title: PhoneValidationResponse
      required:
        - phone_number
        - valid
        - country_code
        - e164_format
        - national_format
        - charge
        - error_code
      type: object
      additionalProperties: false
      properties:
        phone_number:
          type: string
          description: Phone number.
          example: '971569483322'
        valid:
          type: boolean
          description: Indicates whether the phone number is valid.
          example: true
        country_code:
          type:
            - string
            - 'null'
          description: |-
            ISO 3166-1 alpha-2 country code of the phone number.
             `null` if the number is invalid.
          example: AE
        e164_format:
          type: string
          description: Phone number in international E.164 format.
          example: '+971569483322'
        national_format:
          type: string
          description: Phone number in the national format of the identified country.
          example: 056 948 3322
        ported:
          type:
            - boolean
            - 'null'
          description: >-
            Indicates whether the phone number was ported or not. `null` if the
            phone number is invalid.
          example: false
        mcc:
          type:
            - string
            - 'null'
          description: >-
            Mobile Country Code of the phone number carrier. For mobile phone
            numbers only. `null` if the phone number is invalid.
          example: '424'
        mnc:
          type:
            - string
            - 'null'
          description: >-
            Mobile Network Code of the phone number carrier. For mobile phone
            numbers only. `null` if the phone number is invalid
          example: '004'
        number_type:
          type:
            - string
            - 'null'
          description: >-
            Number type. Possible values are `mobile`, `landline`, or
            `toll-free`. `null` if the phone number is invalid.
          example: mobile
        carrier_name:
          type:
            - string
            - 'null'
          description: >-
            Name of the phone number carrier. `null` if the phone number is
            invalid.
          example: Etisalat
        risky_destination:
          type:
            - boolean
            - 'null'
          description: >-
            Indicates whether the phone number belongs to a number range
            associated with traffic pumping. `null` if the number is invalid.
          example: false
        unallocated_range:
          type:
            - boolean
            - 'null'
          description: >-
            Indicates whether the phone number belongs to an unallocated number
            range. `null` if the number is invalid
          example: false
        reachable:
          type:
            - boolean
            - 'null'
          description: >-
            Indicates whether the number is registered in a mobile network. For
            mobile phone numbers only. `null` if the number is invalid
          example: true
        roaming:
          type:
            - boolean
            - 'null'
          description: >-
            Indicates whether the number is roaming. For mobile phone numbers
            only. `null` if the number is invalid
          example: false
        timezone:
          type:
            - string
            - 'null'
          description: |-
            Time zone based on the phone number's country and area code.
             `null` if the number is invalid.
          example: UTC+04:00
        charge:
          type: string
          description: Charge for the validation.
          example: '0.015'
        error_code:
          type: string
          description: |-
            Error code for the request. `000` indicates success.
            Possible values:
            - `013`: — Internal service error
            - `021`: — Invalid phone number length or format
            - `041`: — Request timeout
            - `042`: — Request failed
            - `091`: — Insufficient funds
          example: '000'
    ValidationErrorResponse:
      title: ValidationErrorResponse
      type: object
      properties:
        success:
          type: boolean
          description: >-
            Indicates whether the request was successful. Always `false` for
            this error.
          example: false
        message:
          type: string
          description: >-
            Human-readable description naming the missing or invalid request
            parameter.
          example: Missing or invalid parameter <param_name>
    ForbiddenErrorResponse:
      title: ForbiddenErrorResponse
      type: object
      properties:
        success:
          type: boolean
          description: >-
            Indicates whether the request was successful. Always `false` for
            this error.
          example: false
        message:
          type: string
          description: Human-readable description of why access is forbidden.
          example: The service is not provisioned for your account.
  responses:
    BadRequestErrorResponse:
      description: Request failed. Missing or invalid parameter <param_name>
      headers: {}
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
    ForbiddenErrorResponse:
      description: Request failed. The feature is disabled for your account.
      headers: {}
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Wavix API key. Pass as `Authorization: Bearer <api_key>`. Keys support
        per-resource scopes (none / read / write). See [Restricted keys and
        scopes](https://docs.wavix.com/api-reference/authentication#restricted-keys-and-scopes).

````