Telefono Batch API

Batch validation for multiple numbers

OpenAPI Specification

telefono-batch-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Telefono Carrier Lookup Batch API
  description: Look up carrier and network information for phone numbers worldwide, including MCC, MNC, network type, and real-time HLR lookup for portability-aware detection.
  version: '1.0'
  contact:
    name: Telefono Support
    url: https://www.telefono.com/support
    email: support@telefono.com
  termsOfService: https://www.telefono.com/terms
servers:
- url: https://api.telefono.com/v1
  description: Telefono API
security:
- ApiKeyAuth: []
tags:
- name: Batch
  description: Batch validation for multiple numbers
paths:
  /validate/batch:
    post:
      operationId: validatePhoneNumberBatch
      summary: Validate Phone Number Batch
      description: Validate up to 100 phone numbers in a single request.
      tags:
      - Batch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - numbers
              properties:
                numbers:
                  type: array
                  items:
                    type: object
                    required:
                    - number
                    properties:
                      number:
                        type: string
                        description: Phone number to validate
                      country_code:
                        type: string
                        description: Country code hint
                  maxItems: 100
                  description: List of phone numbers to validate (max 100)
      responses:
        '200':
          description: Batch validation results
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/ValidationResult'
                  processed:
                    type: integer
                    description: Number of numbers processed
                  valid_count:
                    type: integer
                    description: Number of valid numbers
                  invalid_count:
                    type: integer
                    description: Number of invalid numbers
components:
  schemas:
    ValidationResult:
      type: object
      properties:
        number:
          type: string
          description: The input phone number
        valid:
          type: boolean
          description: Whether the phone number is valid
        number_type:
          type: string
          enum:
          - mobile
          - landline
          - voip
          - toll-free
          - premium-rate
          - shared-cost
          - unknown
          description: Type of phone number
        e164_format:
          type: string
          description: Number in E.164 format (e.g., +14155552671)
        national_format:
          type: string
          description: Number in national dialing format (e.g., (415) 555-2671)
        international_format:
          type: string
          description: Number in international format (e.g., +1 415-555-2671)
        country_code:
          type: string
          description: ISO 3166-1 alpha-2 country code (e.g., US)
        country_name:
          type: string
          description: Full country name (e.g., United States)
        country_prefix:
          type: string
          description: International dialing prefix (e.g., +1)
        carrier:
          type: string
          description: Carrier or network operator name
        line_type:
          type: string
          description: Detailed line type classification
        is_reachable:
          type: string
          enum:
          - reachable
          - unreachable
          - unknown
          - risk
          description: Whether the number is likely reachable
        is_virtual:
          type: boolean
          description: Whether the number appears to be a virtual or VoIP number
        calling_code:
          type: integer
          description: Numeric international calling code (e.g., 1 for US)
      required:
      - number
      - valid
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key