Telephony & Bridges
Create Bridge
Create a new telephony bridge for call routing
POST
/
api
/
v2
/
platform
/
telephony
/
bridges
/
Create Bridge
curl --request POST \
--url https://unpod.ai/api/v2/platform/telephony/bridges/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Org-Handle: <org-handle>' \
--data '
{
"name": "Sales Bridge",
"slug": "sales-bridge-001"
}
'import requests
url = "https://unpod.ai/api/v2/platform/telephony/bridges/"
payload = {
"name": "Sales Bridge",
"slug": "sales-bridge-001"
}
headers = {
"Org-Handle": "<org-handle>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Org-Handle': '<org-handle>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Sales Bridge', slug: 'sales-bridge-001'})
};
fetch('https://unpod.ai/api/v2/platform/telephony/bridges/', 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://unpod.ai/api/v2/platform/telephony/bridges/",
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([
'name' => 'Sales Bridge',
'slug' => 'sales-bridge-001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"Org-Handle: <org-handle>"
],
]);
$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://unpod.ai/api/v2/platform/telephony/bridges/"
payload := strings.NewReader("{\n \"name\": \"Sales Bridge\",\n \"slug\": \"sales-bridge-001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Org-Handle", "<org-handle>")
req.Header.Add("Authorization", "<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://unpod.ai/api/v2/platform/telephony/bridges/")
.header("Org-Handle", "<org-handle>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sales Bridge\",\n \"slug\": \"sales-bridge-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://unpod.ai/api/v2/platform/telephony/bridges/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Org-Handle"] = '<org-handle>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Sales Bridge\",\n \"slug\": \"sales-bridge-001\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 201,
"message": "Bridge created successfully.",
"data": {
"id": 314,
"name": "Sales Bridge",
"slug": "sales-bridge-001",
"created_at": "2026-02-07T10:00:00Z"
}
}
{
"status_code": 400,
"message": "Bridge creation failed.",
"errors": "Slug already exists or name is required"
}
{
"status_code": 201,
"message": "Bridge created successfully.",
"data": {
"id": 314,
"name": "Sales Bridge",
"slug": "sales-bridge-001",
"created_at": "2026-02-07T10:00:00Z"
}
}
{
"status_code": 400,
"message": "Bridge creation failed.",
"errors": "Slug already exists or name is required"
}
Create Bridge
Create a new telephony bridge for call routing. Bridges are the core routing entities that link telephony providers and phone numbers to your Voice AI agents.Prerequisites: Make sure you have your API Token and Org-Handle ready. See Authentication for details.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Org-Handle | string | Yes | Organization domain handle |
| Content-Type | string | Yes | application/json |
You can get the
Org-Handle by hitting the Get All Organizations API. The domain_handle field in the response is your Org-Handle.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Display name for the bridge |
| slug | string | Yes | URL-friendly unique identifier for the bridge |
Response Fields
| Field | Type | Description |
|---|---|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | object | Created bridge details |
Bridge Object Fields
| Field | Type | Description |
|---|---|---|
| id | integer | Bridge unique identifier |
| name | string | Bridge display name |
| slug | string | Unique bridge slug identifier |
| created_at | string | Bridge creation timestamp (ISO 8601) |
Common Error Codes
| Status Code | Description |
|---|---|
| 201 | Created - Bridge created successfully |
| 400 | Bad Request - Invalid or duplicate slug/name |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Invalid organization handle |
| 409 | Conflict - Bridge with this slug already exists |
| 500 | Internal Server Error - Server-side error |
Code Examples
const axios = require('axios');
const headers = {
'Authorization': 'Token your-api-token',
'Org-Handle': 'your-org-handle',
'Content-Type': 'application/json'
};
// Create a new telephony bridge
const createBridge = async (name, slug) => {
const response = await axios.post(
'https://unpod.ai/api/v2/platform/telephony/bridges/',
{ name, slug },
{ headers }
);
console.log(`Bridge created: ${response.data.data.slug} (ID: ${response.data.data.id})`);
return response.data.data;
};
// Example usage
createBridge('Sales Bridge', 'sales-bridge-001');
import requests
headers = {
'Authorization': 'Token your-api-token',
'Org-Handle': 'your-org-handle',
'Content-Type': 'application/json'
}
def create_bridge(name: str, slug: str):
"""Create a new telephony bridge"""
url = 'https://unpod.ai/api/v2/platform/telephony/bridges/'
payload = {'name': name, 'slug': slug}
response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(f"Bridge created: {data['data']['slug']} (ID: {data['data']['id']})")
return data['data']
# Example usage
create_bridge('Sales Bridge', 'sales-bridge-001')
# Create a new telephony bridge
curl -X POST "https://unpod.ai/api/v2/platform/telephony/bridges/" \
-H "Authorization: Token your-api-token" \
-H "Org-Handle: your-org-handle" \
-H "Content-Type: application/json" \
-d '{
"name": "Sales Bridge",
"slug": "sales-bridge-001"
}'
Best Practices
- Slug Naming: Use descriptive, lowercase slugs (e.g.,
sales-outbound-us) to easily identify bridges - Unique Slugs: Ensure slugs are unique across your organization to avoid conflicts
- Post-Creation: After creating a bridge, use Connect Provider to Bridge to link a telephony provider
- Bridge ID: Store the returned
idandslugfor subsequent bridge management operations - Error Handling: Handle 409 Conflict responses for duplicate slugs
- Security: Keep API tokens secure and rotate them regularly
Was this page helpful?
⌘I
Create Bridge
curl --request POST \
--url https://unpod.ai/api/v2/platform/telephony/bridges/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Org-Handle: <org-handle>' \
--data '
{
"name": "Sales Bridge",
"slug": "sales-bridge-001"
}
'import requests
url = "https://unpod.ai/api/v2/platform/telephony/bridges/"
payload = {
"name": "Sales Bridge",
"slug": "sales-bridge-001"
}
headers = {
"Org-Handle": "<org-handle>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Org-Handle': '<org-handle>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Sales Bridge', slug: 'sales-bridge-001'})
};
fetch('https://unpod.ai/api/v2/platform/telephony/bridges/', 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://unpod.ai/api/v2/platform/telephony/bridges/",
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([
'name' => 'Sales Bridge',
'slug' => 'sales-bridge-001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"Org-Handle: <org-handle>"
],
]);
$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://unpod.ai/api/v2/platform/telephony/bridges/"
payload := strings.NewReader("{\n \"name\": \"Sales Bridge\",\n \"slug\": \"sales-bridge-001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Org-Handle", "<org-handle>")
req.Header.Add("Authorization", "<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://unpod.ai/api/v2/platform/telephony/bridges/")
.header("Org-Handle", "<org-handle>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sales Bridge\",\n \"slug\": \"sales-bridge-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://unpod.ai/api/v2/platform/telephony/bridges/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Org-Handle"] = '<org-handle>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Sales Bridge\",\n \"slug\": \"sales-bridge-001\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 201,
"message": "Bridge created successfully.",
"data": {
"id": 314,
"name": "Sales Bridge",
"slug": "sales-bridge-001",
"created_at": "2026-02-07T10:00:00Z"
}
}
{
"status_code": 400,
"message": "Bridge creation failed.",
"errors": "Slug already exists or name is required"
}