POST
/
api
/
v1
/
phone-numbers
/
buy
curl -X POST https://api.ravan.ai/api/v1/phone-numbers/buy/ \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+13612738809",
    "price": 1.15,
    "per_minute_price_inbound": 0.0085,
    "per_minute_price_outbound": 0.0945
  }'
{
  "success": true,
  "message": "Phone number purchased successfully",
  "data": {
    "phone_number": "+13612738809",
    "price": 1.15,
    "status": "active",
    "purchased_at": "2026-03-20T14:30:00Z"
  }
}
This endpoint charges your account. Make sure you have retrieved the number from the available numbers list first and confirmed the pricing.

Authorizations

X-Api-Key
string
required
Your Agni API key. Find it in your support@ravan.ai under Settings → API Keys.

Body

phone_number
string
required
Phone number to purchase in E.164 format (e.g. +13612738809). Must be an available number from the list endpoint.
price
number
required
Monthly price as returned by the available numbers endpoint.
per_minute_price_inbound
number
Per-minute inbound call price as returned by the available numbers endpoint.
per_minute_price_outbound
number
Per-minute outbound call price as returned by the available numbers endpoint.

Response

success
boolean
Whether the request succeeded.
message
string
Human-readable status message.
data
object
Purchase confirmation.
curl -X POST https://api.ravan.ai/api/v1/phone-numbers/buy/ \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+13612738809",
    "price": 1.15,
    "per_minute_price_inbound": 0.0085,
    "per_minute_price_outbound": 0.0945
  }'
{
  "success": true,
  "message": "Phone number purchased successfully",
  "data": {
    "phone_number": "+13612738809",
    "price": 1.15,
    "status": "active",
    "purchased_at": "2026-03-20T14:30:00Z"
  }
}

Authorizations

X-Api-Key
string
header
required

Body

application/json
phone_number
string

Phone number to purchase (E.164 format)

price
number<double>

Purchase price

per_minute_price_inbound
integer<int32>

Per-minute inbound call price

per_minute_price_outbound
integer<int32>

Per-minute outbound call price

Response

Successful response

success
boolean
message
string
data
object