Use this endpoint to connect your own telephony provider to Agni. Once registered, you can import phone numbers from that provider and use them with your voice agents.

Authorizations

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

Body

type
string
required
The telephony provider type. Supported values: twilio, telnyx, vonage, custom.
owner_type
string
required
Ownership scope — typically organization.
friendly_name
string
required
A human-readable label for this telephony configuration (e.g. "My Twilio Account").
client_id
string
Provider API key, Account SID, or equivalent credential identifier.
client_secret
string
Provider Auth Token, API secret, or equivalent secret credential.

Response

success
boolean
Whether the request succeeded.
message
string
Human-readable status message.
data
object
The created telephony configuration.
curl -X POST https://api.ravan.ai/api/v1/phone-numbers/create/telephony \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "twilio",
    "owner_type": "organization",
    "friendly_name": "My Twilio Account",
    "client_id": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "client_secret": "your_auth_token_here"
  }'
{
  "success": true,
  "message": "Telephony type created successfully",
  "data": {
    "id": "019d4c5e-7f8a-9b0c-1d2e-3f4a5b6c7d8e",
    "type": "twilio",
    "owner_type": "organization",
    "friendly_name": "My Twilio Account",
    "status": "active",
    "created_at": "2026-03-20T14:30:00Z",
    "termination_uri": "",
    "sip_username": "",
    "sip_password": ""
  }
}