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

# Buy a phone number and set up its AI agent

> Provisions a new Telnyx number on the LiveKit stack and configures the AI agent that answers it — business context, system prompt, greeting, voice and language — in a single request. Set `handle_calls` (default true) for inbound AI call answering and `handle_texts` (default false) to have the same agent answer inbound SMS on the number. Returns 202; poll `GET /v1/quick/ai-numbers/{id}` until `status` is `ready`. Billing: the number's $5/month line fee is charged immediately to the organization that owns the API key; calls and texts on your own number are billed at your plan's rates, not the Quick Action rates.



## OpenAPI

````yaml /openapi.json post /v1/quick/ai-numbers
openapi: 3.1.0
info:
  title: LumisReach v1 API
  version: 1.0.0
  description: >-
    Programmatic access to the LumisReach voice platform — calls, numbers,
    caller trust, and brands.
  contact:
    name: LumisReach
    email: founders@lumisreach.com
servers:
  - url: https://api.lumisreach.com/api
security:
  - bearerAuth: []
tags:
  - name: Phone Numbers
  - name: Caller IDs
  - name: Enterprise Registration
  - name: Branded Calling
  - name: Calls
  - name: SMS
  - name: WebRTC
  - name: Reputation
  - name: Usage
  - name: Account
  - name: Documents
  - name: Quick Agent Actions
  - name: Sub-entities
paths:
  /v1/quick/ai-numbers:
    post:
      tags:
        - Quick Agent Actions
      summary: Buy a phone number and set up its AI agent
      description: >-
        Provisions a new Telnyx number on the LiveKit stack and configures the
        AI agent that answers it — business context, system prompt, greeting,
        voice and language — in a single request. Set `handle_calls` (default
        true) for inbound AI call answering and `handle_texts` (default false)
        to have the same agent answer inbound SMS on the number. Returns 202;
        poll `GET /v1/quick/ai-numbers/{id}` until `status` is `ready`. Billing:
        the number's $5/month line fee is charged immediately to the
        organization that owns the API key; calls and texts on your own number
        are billed at your plan's rates, not the Quick Action rates.
      operationId: v1_quick_ai_numbers_post
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            UUID — when present, deduplicates repeat submissions. See
            /api-reference/idempotency.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: http://json-schema.org/draft-07/schema#
              type: object
              properties:
                phone_number:
                  type: string
                  pattern: ^\+[1-9]\d{1,14}$
                area_code:
                  type: string
                  pattern: ^\d{3}$
                name:
                  type: string
                  maxLength: 120
                business_name:
                  type: string
                  maxLength: 200
                business_description:
                  type: string
                  maxLength: 4000
                agent_prompt:
                  type: string
                  maxLength: 8000
                greeting:
                  type: string
                  maxLength: 500
                voice:
                  type: string
                  maxLength: 120
                voice_model_tier:
                  type: string
                  enum:
                    - standard
                    - mini
                language:
                  default: en
                  type: string
                  maxLength: 10
                timezone:
                  type: string
                  maxLength: 64
                handle_calls:
                  default: true
                  type: boolean
                handle_texts:
                  default: false
                  type: boolean
                sms_prompt:
                  type: string
                  maxLength: 8000
              required:
                - language
                - handle_calls
                - handle_texts
              additionalProperties: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $schema: http://json-schema.org/draft-07/schema#
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: number
                      status:
                        type: string
                        const: provisioning
                      workflow_run_id:
                        type: string
                      handles_calls:
                        type: boolean
                      handles_texts:
                        type: boolean
                      status_url:
                        type: string
                    required:
                      - id
                      - status
                      - workflow_run_id
                      - handles_calls
                      - handles_texts
                      - status_url
                    additionalProperties: false
                required:
                  - data
                additionalProperties: false
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: Conflict (incl. idempotency conflicts)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    ErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            fields:
              type: object
              additionalProperties:
                type: string
            doc_url:
              type: string
              format: uri
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````