Skip to main content
POST
Buy Phone Number

Authorizations

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.

Body

string
The phone number in E.164 format. Example: +14157774444.
number
The purchase price or configured price for the phone number.
integer
The inbound call price per minute for the phone number.
integer
The outbound call price per minute for the phone number.

Response

boolean
Whether the request succeeded.
string
Human-readable status message.
object
Returned data.

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