Create Telephony Type
curl --request POST \
--url https://api.ravan.ai/api/v1/phone-numbers/create/telephony/ \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"type": "<string>",
"owner_type": "<string>",
"friendly_name": "<string>",
"client_id": "<string>",
"client_secret": "<string>"
}
'import requests
url = "https://api.ravan.ai/api/v1/phone-numbers/create/telephony/"
payload = {
"type": "<string>",
"owner_type": "<string>",
"friendly_name": "<string>",
"client_id": "<string>",
"client_secret": "<string>"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
owner_type: '<string>',
friendly_name: '<string>',
client_id: '<string>',
client_secret: '<string>'
})
};
fetch('https://api.ravan.ai/api/v1/phone-numbers/create/telephony/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ravan.ai/api/v1/phone-numbers/create/telephony/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'owner_type' => '<string>',
'friendly_name' => '<string>',
'client_id' => '<string>',
'client_secret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ravan.ai/api/v1/phone-numbers/create/telephony/"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"owner_type\": \"<string>\",\n \"friendly_name\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ravan.ai/api/v1/phone-numbers/create/telephony/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"owner_type\": \"<string>\",\n \"friendly_name\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravan.ai/api/v1/phone-numbers/create/telephony/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"owner_type\": \"<string>\",\n \"friendly_name\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Request completed successfully",
"data": {
"id": "id_123",
"type": "twilio",
"owner_type": "twilio",
"friendly_name": "Support Bot",
"status": "active",
"created_at": "2026-03-14T12:00:00Z",
"termination_uri": "sip:example@provider.com",
"sip_username": "sip-user",
"sip_password": "secret-password"
}
}
Phone Number & Telephony API
Create Telephony Type
Create Telephony Type.
POST
/
api
/
v1
/
phone-numbers
/
create
/
telephony
/
Create Telephony Type
curl --request POST \
--url https://api.ravan.ai/api/v1/phone-numbers/create/telephony/ \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"type": "<string>",
"owner_type": "<string>",
"friendly_name": "<string>",
"client_id": "<string>",
"client_secret": "<string>"
}
'import requests
url = "https://api.ravan.ai/api/v1/phone-numbers/create/telephony/"
payload = {
"type": "<string>",
"owner_type": "<string>",
"friendly_name": "<string>",
"client_id": "<string>",
"client_secret": "<string>"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
owner_type: '<string>',
friendly_name: '<string>',
client_id: '<string>',
client_secret: '<string>'
})
};
fetch('https://api.ravan.ai/api/v1/phone-numbers/create/telephony/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ravan.ai/api/v1/phone-numbers/create/telephony/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'owner_type' => '<string>',
'friendly_name' => '<string>',
'client_id' => '<string>',
'client_secret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ravan.ai/api/v1/phone-numbers/create/telephony/"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"owner_type\": \"<string>\",\n \"friendly_name\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ravan.ai/api/v1/phone-numbers/create/telephony/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"owner_type\": \"<string>\",\n \"friendly_name\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravan.ai/api/v1/phone-numbers/create/telephony/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"owner_type\": \"<string>\",\n \"friendly_name\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Request completed successfully",
"data": {
"id": "id_123",
"type": "twilio",
"owner_type": "twilio",
"friendly_name": "Support Bot",
"status": "active",
"created_at": "2026-03-14T12:00:00Z",
"termination_uri": "sip:example@provider.com",
"sip_username": "sip-user",
"sip_password": "secret-password"
}
}
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 telephony provider type to configure. Use the provider value supported by your account.
string
The owner type for the connected account or resource. Use the provider-specific value expected by the integration.
string
A human-readable label for the phone number. Use a name that helps your team identify its purpose.
string
The OAuth client ID from the connected provider.
string
The OAuth client secret from the connected provider. Treat this value as sensitive.
Response
boolean
Whether the request succeeded.
string
Human-readable status message.
object
{
"success": true,
"message": "Request completed successfully",
"data": {
"id": "id_123",
"type": "twilio",
"owner_type": "twilio",
"friendly_name": "Support Bot",
"status": "active",
"created_at": "2026-03-14T12:00:00Z",
"termination_uri": "sip:example@provider.com",
"sip_username": "sip-user",
"sip_password": "secret-password"
}
}
Authorizations
Body
application/json
⌘I

