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

# Search available phone numbers

> Search for available phone numbers to purchase by country and type.



## OpenAPI

````yaml /openapi.json get /v1/phone-numbers/available
openapi: 3.0.3
info:
  title: Zavu Unified Messaging Layer API
  version: 0.2.0
  description: >
    Unified multi-channel messaging API for Zavu.


    Supported channels:

    - **SMS**: Simple text messages

    - **WhatsApp**: Rich messaging with media, buttons, lists, CTA URL buttons,
    location requests, and templates

    - **Telegram**: Bot messaging with text, media, and interactive elements

    - **Email**: Transactional emails via Amazon SES


    Design goals:

    - Simple `send()` entrypoint for developers

    - Project-level authentication via Bearer token

    - Support for all WhatsApp message types (text, image, video, audio,
    document, sticker, location, contact, buttons, list, cta_url,
    location_request, reaction, template)

    - If a non-text message type is sent, WhatsApp channel is used automatically

    - 24-hour WhatsApp conversation window enforcement

    - Universal `to` field accepts phone numbers (E.164), email addresses, or
    numeric chat IDs (Telegram/Instagram/Messenger)
servers:
  - url: https://api.zavu.dev
security:
  - bearerAuth: []
paths:
  /v1/phone-numbers/available:
    get:
      summary: Search available phone numbers
      description: Search for available phone numbers to purchase by country and type.
      operationId: searchAvailablePhoneNumbers
      parameters:
        - name: countryCode
          in: query
          required: true
          schema:
            type: string
            minLength: 2
            maxLength: 2
          example: US
          description: Two-letter ISO country code.
        - name: type
          in: query
          schema:
            $ref: '#/components/schemas/PhoneNumberType'
          description: Type of phone number to search for.
        - name: contains
          in: query
          schema:
            type: string
            maxLength: 20
          description: Search for numbers containing this string.
        - name: capabilities
          in: query
          description: >-
            Comma-separated capabilities the number must have: `sms`, `voice`,
            `mms`. Numbers missing any of them are dropped.
          schema:
            type: string
            example: voice,sms
        - name: limit
          in: query
          schema:
            type: integer
            default: 10
            maximum: 50
          description: Maximum number of results to return.
      responses:
        '200':
          description: List of available phone numbers.
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/AvailablePhoneNumber'
        '400':
          description: >-
            Invalid query parameters, or `country_restricted`: phone numbers in
            this country are not sold self-service and need a minimum
            commitment. The message names who to contact.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                country_restricted:
                  summary: Country needs an enterprise agreement
                  value:
                    code: country_restricted
                    message: >-
                      Phone numbers in this country require a 12-month minimum
                      commitment. Contact sales@zavu.dev for enterprise plans.
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            `country_unavailable`: we do not currently stock numbers in this
            country. Distinct from an empty `items` array, which means the
            country is served but nothing matched your filters — retry with
            another `type`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: country_unavailable
                message: Phone numbers are not available in this country.
      security:
        - bearerAuth: []
components:
  schemas:
    PhoneNumberType:
      type: string
      enum:
        - local
        - national
        - tollFree
        - mobile
      description: >-
        Type of phone number. `mobile` is stocked in countries where no
        geographic (`local`) or non-geographic (`national`) inventory exists,
        and in several markets it is the only type that can receive SMS.
    AvailablePhoneNumber:
      type: object
      required:
        - phoneNumber
        - capabilities
        - pricing
      properties:
        phoneNumber:
          type: string
          example: '+15551234567'
        friendlyName:
          type: string
          example: (555) 123-4567
        locality:
          type: string
          example: San Francisco
        region:
          type: string
          example: CA
        capabilities:
          $ref: '#/components/schemas/PhoneNumberCapabilities'
        pricing:
          $ref: '#/components/schemas/PhoneNumberPricing'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: invalid_request
        message:
          type: string
          example: Phone number is invalid
        details:
          type: object
          additionalProperties: true
    PhoneNumberCapabilities:
      type: object
      properties:
        sms:
          type: boolean
        voice:
          type: boolean
        mms:
          type: boolean
    PhoneNumberPricing:
      type: object
      properties:
        monthlyPrice:
          type: number
          description: Monthly price in USD.
        upfrontPrice:
          type: number
          description: One-time purchase price in USD.
        isFreeEligible:
          type: boolean
          description: >-
            Whether this number qualifies as the plan-included number: a US or
            Canadian number (a +1 number) costing $20 a month or less. The
            benefit is one per account: it is never offered again once claimed,
            not even after the number is released.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````