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

# Check phone number purchase availability

> Checks whether a phone number can be purchased for the current business before creating or assigning it.



## OpenAPI

````yaml /openapi.json post /phone-numbers/is-available-for-purchase
openapi: 3.0.4
info:
  title: Leadping API
  description: >-
    Leadping API for lead intake, messaging, calling, automations, billing,
    business settings, and compliant lead communication workflows.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: v1
servers:
  - url: https://api.leadping.ai
    description: Production
security: []
tags:
  - name: Analytics
  - name: Automations
  - name: Contact
  - name: Conversations
  - name: Dispositions
  - name: Feedback
  - name: Leads
  - name: LeadStatuses
  - name: Notifications
  - name: OutboundDelivery
  - name: Sources
  - name: Suppressions
  - name: Tags
  - name: Users
  - name: Calls
  - name: PhoneNumbers
  - name: Sms
  - name: Telephony
  - name: UserDataExports
  - name: CallEvents
  - name: Events
  - name: SmsEvents
  - name: Businesses
  - name: PaymentMethods
  - name: Transactions
  - name: Usage
  - name: Wallets
paths:
  /phone-numbers/is-available-for-purchase:
    post:
      tags:
        - PhoneNumbers
      summary: Check phone number purchase availability
      description: >-
        Checks whether a phone number can be purchased for the current business
        before creating or assigning it.
      operationId: PhoneNumbers_IsAvailableForPurchase
      requestBody:
        description: The phone number availability request.
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PhoneNumberAvailabilityRequest'
              description: >-
                Request schema for checking phone number availability before
                purchase or assignment.
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PhoneNumberAvailabilityRequest'
              description: >-
                Request schema for checking phone number availability before
                purchase or assignment.
        required: true
      responses:
        '200':
          description: Returns the phone number availability response.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PhoneNumberAvailabilityResponse'
                description: >-
                  Response schema for the Leadping API phone number availability
                  result returned to authenticated clients.
        '400':
          description: The request was invalid or failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: An unexpected server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    PhoneNumberAvailabilityRequest:
      type: object
      properties:
        phoneNumber:
          type: string
          description: >-
            Phone number to check for availability, formatted for provider
            lookup.
      description: >-
        Request schema for checking phone number availability before purchase or
        assignment.
    PhoneNumberAvailabilityResponse:
      type: object
      properties:
        phoneNumber:
          type: string
          description: >-
            Phone number used by this phone number availability result for
            calls, SMS, lookup, or routing.
        isAvailable:
          type: boolean
          description: >-
            Indicates whether this phone number is available for purchase or
            assignment.
        price:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          description: Lead price or transaction price supplied to the Leadping API.
          format: double
          nullable: true
        currency:
          type: string
          description: >-
            ISO currency code used for the monetary amounts in this phone number
            availability result.
          nullable: true
        location:
          type: object
          allOf:
            - $ref: '#/components/schemas/PhoneNumberLocation'
          description: >-
            Geographic location metadata for the phone number, lead, or lookup
            result.
          nullable: true
      description: >-
        Response schema for the Leadping API phone number availability result
        returned to authenticated clients.
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          description: URI reference that identifies the problem type.
          nullable: true
        title:
          type: string
          description: Short, human-readable summary of the problem.
          nullable: true
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          description: HTTP status code returned for the problem.
          format: int32
          nullable: true
        detail:
          type: string
          description: >-
            Human-readable explanation specific to this occurrence of the
            problem.
          nullable: true
        instance:
          type: string
          description: >-
            URI reference that identifies this specific occurrence of the
            problem.
          nullable: true
    PhoneNumberLocation:
      type: object
      properties:
        location:
          type: string
          description: >-
            Geographic location metadata for the phone number, lead, or lookup
            result.
          nullable: true
        state:
          type: string
          description: State, province, or region for the lead or business postal address.
          nullable: true
        canonicalCity:
          type: string
          description: >-
            Canonical city resolved by Leadping from its ZIP-code geography
            data.
          nullable: true
        canonicalState:
          type: string
          description: Canonical state or territory abbreviation resolved by Leadping.
          nullable: true
        countryCode:
          type: string
          description: >-
            Country code for the phone number or location represented by this
            phone number location.
          nullable: true
        coordinate:
          type: object
          allOf:
            - $ref: '#/components/schemas/Coordinate'
          description: Latitude and longitude coordinate for this phone number location.
          nullable: true
        coordinateSource:
          type: object
          allOf:
            - $ref: '#/components/schemas/PhoneLocationSource'
          description: Describes how the coordinate was resolved.
          nullable: true
        timeZoneId:
          type: string
          description: >-
            IANA or Windows time zone identifier used for local scheduling and
            reporting.
          nullable: true
        timeZoneSource:
          type: object
          allOf:
            - $ref: '#/components/schemas/PhoneLocationSource'
          description: Describes how the time zone was resolved.
          nullable: true
      description: Public Leadping API schema for phone number location data.
    Coordinate:
      required:
        - latitude
        - longitude
      type: object
      properties:
        latitude:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$
          description: >-
            Latitude of the geographic coordinate in decimal degrees, from -90
            through 90.
          format: double
        longitude:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$
          description: >-
            Longitude of the geographic coordinate in decimal degrees, from -180
            through 180.
          format: double
      description: Latitude and longitude coordinate for this lead contact profile.
    PhoneLocationSource:
      type: object
      properties:
        method:
          type: string
          description: >-
            The resolution method, such as telnyx-city-state, coordinates,
            phone-number, or state-default.
        query:
          type: string
          description: >-
            The city, state, coordinates, phone number, or representative ZIP
            used by the method.
          nullable: true
      description: Describes how a phone location value was resolved.

````