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

# Buy Phone Number

> Buy a phone number



## OpenAPI

````yaml openapi-phone-numbers POST /phone-numbers/buy-phone-number
openapi: 3.0.1
info:
  title: Puretalk AI
  description: Api Documentation for Puretalk AI
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.puretalk.ai/api
security:
  - ApiKeyAuth: []
paths:
  /phone-numbers/buy-phone-number:
    post:
      description: Buy a phone number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - phone_number
              properties:
                phone_number:
                  type: string
                  description: The phone number to buy
      responses:
        '201':
          description: Phone number purchased successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  err:
                    type: boolean
                    description: Indicates if there was an error
                    example: false
                  msg:
                    type: string
                    example: Phone number purchased successfully.
                    description: A success message
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - err
        - msg
      type: object
      properties:
        err:
          type: boolean
          example: true
          description: Indicates if there was an error
        msg:
          type: string
          example: An error occurred.
          description: A message describing the error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Authorization header containing API key. You can find your API key in
        the dashboard under 'API Keys'.

````