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

# Purchase Phone Number

> Buy a requested managed DID from Vobiz inventory. **Platform-admin only —
debits the platform Vobiz balance.** Operates on a `provisioning` managed row
(created when the customer requested the number); the row stays
`provisioning` afterwards — activation (which includes the carrier-side trunk
attachment) is still the separate Activate step. Idempotent: a row already
purchased is returned without re-charging.



## OpenAPI

````yaml /api-reference/openapi.json post /phone-numbers/{phone_number_id}/purchase
openapi: 3.1.0
info:
  title: Lehar API
  version: v0
  description: >-
    Customer-facing REST API for the Lehar voice-AI platform. Platform-admin
    endpoints are intentionally excluded from this reference. Regenerate with
    `npm run sync:openapi`.
servers:
  - url: https://api.lehar.ai/ca/api/v0
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /phone-numbers/{phone_number_id}/purchase:
    post:
      tags:
        - Phone Numbers
      summary: Purchase Phone Number
      description: >-
        Buy a requested managed DID from Vobiz inventory. **Platform-admin only
        —

        debits the platform Vobiz balance.** Operates on a `provisioning`
        managed row

        (created when the customer requested the number); the row stays

        `provisioning` afterwards — activation (which includes the carrier-side
        trunk

        attachment) is still the separate Activate step. Idempotent: a row
        already

        purchased is returned without re-charging.
      operationId: >-
        purchase_phone_number_ca_api_v0_phone_numbers__phone_number_id__purchase_post
      parameters:
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: string
            title: Phone Number Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    BearerAuth:
      type: http
      scheme: bearer

````