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

# Buy Phone Number

> Buy Phone Number.

### Authorizations

<ParamField header="X-Api-Key" type="string" required>
  Your Agni API key used to authenticate the request. Pass it in the `X-Api-Key` header. Find or rotate it from your Ravan AI account settings.
</ParamField>

***

### Body

<ParamField body="phone_number" type="string">
  The phone number in E.164 format. Example: `+14157774444`.
</ParamField>

<ParamField body="price" type="number">
  The purchase price or configured price for the phone number.
</ParamField>

<ParamField body="per_minute_price_inbound" type="integer">
  The inbound call price per minute for the phone number.
</ParamField>

<ParamField body="per_minute_price_outbound" type="integer">
  The outbound call price per minute for the phone number.
</ParamField>

***

### Response

<ResponseField name="success" type="boolean">
  Whether the request succeeded.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable status message.
</ResponseField>

<ResponseField name="data" type="object">
  Returned data.

  <Expandable title="data">
    <ResponseField name="phone_number" type="string">
      The purchased phone number
    </ResponseField>

    <ResponseField name="price" type="number">
      Price paid
    </ResponseField>

    <ResponseField name="status" type="string">
      Purchase status
    </ResponseField>

    <ResponseField name="purchased_at" type="string">
      Timestamp of purchase
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Request completed successfully",
    "data": {
      "phone_number": "+14155550100",
      "price": 1.99,
      "status": "active",
      "purchased_at": "2026-03-14T12:00:00Z"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /api/v1/phone-numbers/buy/
openapi: 3.0.1
info:
  title: Agni API
  version: 1.0.0
  description: >-
    Agni API for managing agents, tools, widget settings, telephony, and
    integrations.
servers:
  - url: https://api.ravan.ai
security:
  - X-Api-Key: []
tags:
  - name: AgentService
  - name: AgentToolService
  - name: WidgetSettingsService
  - name: PhoneService
  - name: AppointmentService
  - name: GHLService
  - name: CalComService
  - name: CampaignService
  - name: ContactService
  - name: CallingService
  - name: RAGService
  - name: ModelService
  - name: HealthService
paths:
  /api/v1/phone-numbers/buy/:
    post:
      tags:
        - PhoneService
      summary: Buy Phone Number
      operationId: BuyPhoneNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuyPhoneNumberRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuyPhoneNumberResponse'
components:
  schemas:
    BuyPhoneNumberRequest:
      type: object
      properties:
        phone_number:
          type: string
          description: Phone number to purchase (E.164 format)
        price:
          type: number
          format: double
          description: Purchase price
        per_minute_price_inbound:
          type: integer
          format: int32
          description: Per-minute inbound call price
        per_minute_price_outbound:
          type: integer
          format: int32
          description: Per-minute outbound call price
    BuyPhoneNumberResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/PurchasedPhoneNumber'
    PurchasedPhoneNumber:
      type: object
      properties:
        phone_number:
          type: string
          description: The purchased phone number
        price:
          type: number
          format: double
          description: Price paid
        status:
          type: string
          description: Purchase status
        purchased_at:
          type: string
          description: Timestamp of purchase
  securitySchemes:
    X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key

````