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

# Buy number



## OpenAPI

````yaml /openapi.yml post /v1/numbers/buy
openapi: 3.0.0
info:
  title: Fluents Hosted API
  description: |2-

            Fluents' Hosted API helps you automate phone calls in minutes. 🚀

            ## Numbers

            You can buy phone lines and place agents on them.

            ## Calls

            You can start, end, and get information about calls.
            
  version: 1.0.0
  contact:
    name: Support
    url: https://fluents.com
    email: support@fluents.ai
servers:
  - url: https://api.fluents.ai
    description: Production
security:
  - bearer: []
tags: []
paths:
  /v1/numbers/buy:
    post:
      tags:
        - Numbers
      operationId: NumberController_buyNumber
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuyNumberDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizedNumberDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
components:
  schemas:
    BuyNumberDto:
      type: object
      properties:
        area_code:
          type: string
          example: '415'
        phone_number:
          type: string
          example: '+1234567890'
        telephony_provider:
          type: object
          example: twilio
        telephony_account_connection:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        inbound_agent:
          type: object
          example: Agent Name
      required:
        - telephony_provider
        - telephony_account_connection
    NormalizedNumberDto:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        user_id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        number:
          type: string
          example: '+1234567890'
        active:
          type: boolean
          example: true
        label:
          type: string
          example: My Phone Number
        inbound_agent_name:
          type: string
          example: Agent Name
        outbound_only:
          type: boolean
          example: false
        example_context:
          type: object
        telephony_provider:
          type: object
          example: twilio
        description:
          type: string
          example: Business line for customer service
        inbound_agent:
          type: object
          example: agent_123
        telephony_account_connection:
          type: object
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - id
        - user_id
        - number
        - example_context
    BadRequestError:
      type: object
      properties:
        message:
          type: string
        error:
          type: string
        statusCode:
          type: number
          example: 400
      required:
        - message
        - error
        - statusCode
    NotFoundError:
      type: object
      properties:
        message:
          type: string
        error:
          type: string
        statusCode:
          type: number
          example: 404
      required:
        - message
        - error
        - statusCode
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````