Skip to main content
POST
/
api
/
v1
/
phone-numbers
/
buy
Buy Phone Number
curl --request POST \
  --url https://api.ravan.ai/api/v1/phone-numbers/buy/ \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "phone_number": "<string>",
  "price": 123,
  "per_minute_price_inbound": 123,
  "per_minute_price_outbound": 123
}
'
{
  "success": true,
  "message": "Request completed successfully",
  "data": {
    "phone_number": "+14155550100",
    "price": 1.99,
    "status": "active",
    "purchased_at": "2026-03-14T12:00:00Z"
  }
}

Authorizations

X-Api-Key
string
required
Your Agni API key. Find it in your RavanAi.

Body

phone_number
string
Phone number to purchase (E.164 format)
price
number
Purchase price
per_minute_price_inbound
integer
Per-minute inbound call price
per_minute_price_outbound
integer
Per-minute outbound call price

Response

success
boolean
Whether the request succeeded.
message
string
Human-readable status message.
data
object
Returned data.
{
  "success": true,
  "message": "Request completed successfully",
  "data": {
    "phone_number": "+14155550100",
    "price": 1.99,
    "status": "active",
    "purchased_at": "2026-03-14T12:00: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

200 - application/json

Successful response

success
boolean
message
string
data
object