You must first connect your Twilio account using Create Telephony Type and retrieve your numbers via List Twilio Numbers before adding them.

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 in E.164 format (e.g. +14155550100). Must be a number from your Twilio account.
friendly_name
string
A friendly label for the number.
price
number
Monthly price of the number.
per_minute_price_inbound
number
Per-minute inbound call rate.
per_minute_price_outbound
number
Per-minute outbound call rate.
region
string
Region or area code of the number.
iso_country
string
ISO country code (e.g. US, GB).
number_sid
string
required
The Twilio SID for this phone number (starts with PN).

Response

success
boolean
Whether the request succeeded.
message
string
Human-readable status message.
data
object
The added phone number record.
curl -X POST https://api.ravan.ai/api/v1/phone-numbers/add-twilio \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+14155550100",
    "friendly_name": "Sales Line",
    "price": 1.15,
    "per_minute_price_inbound": 0.0085,
    "per_minute_price_outbound": 0.0945,
    "region": "CA",
    "iso_country": "US",
    "number_sid": "PNxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }'
{
  "success": true,
  "message": "Twilio number added successfully",
  "data": {
    "id": "019d5e6f-7a8b-9c0d-1e2f-3a4b5c6d7e8f",
    "telephony_id": "019d4c5e-7f8a-9b0c-1d2e-3f4a5b6c7d8e",
    "subscription_id": "",
    "inbound_trunk_id": "TK_inbound_xxxx",
    "outbound_trunk_id": "TK_outbound_xxxx",
    "number": "+14155550100",
    "friendly_name": "Sales Line",
    "type": "twilio",
    "per_minute_price_inbound": 0.0085,
    "per_minute_price_outbound": 0.0945,
    "price": 1.15,
    "region": "CA",
    "iso_country": "US",
    "is_active": true,
    "created_at": "2026-03-20T14:30:00Z",
    "updated_at": "2026-03-20T14:30:00Z"
  }
}