Telephony & Bridges
Update Bridge
Update an existing telephony bridge configuration
PATCH
/
api
/
v2
/
platform
/
telephony
/
bridges
/
{slug}
/
Update Bridge
curl --request PATCH \
--url https://unpod.ai/api/v2/platform/telephony/bridges/{slug}/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Org-Handle: <org-handle>' \
--data '
{
"name": "Sales Bridge — Updated"
}
'import requests
url = "https://unpod.ai/api/v2/platform/telephony/bridges/{slug}/"
payload = { "name": "Sales Bridge — Updated" }
headers = {
"Org-Handle": "<org-handle>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Org-Handle': '<org-handle>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Sales Bridge — Updated'})
};
fetch('https://unpod.ai/api/v2/platform/telephony/bridges/{slug}/', 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/{slug}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Sales Bridge — Updated'
]),
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/{slug}/"
payload := strings.NewReader("{\n \"name\": \"Sales Bridge — Updated\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://unpod.ai/api/v2/platform/telephony/bridges/{slug}/")
.header("Org-Handle", "<org-handle>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sales Bridge — Updated\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://unpod.ai/api/v2/platform/telephony/bridges/{slug}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Org-Handle"] = '<org-handle>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Sales Bridge — Updated\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 200,
"message": "Bridge updated successfully.",
"data": {
"id": 314,
"name": "Sales Bridge - Updated",
"slug": "sales-bridge-001",
"numbers": [
{
"id": 501,
"number": "+1234567890",
"status": "active"
}
]
}
}
{
"status_code": 404,
"message": "Bridge not found."
}
{
"status_code": 200,
"message": "Bridge updated successfully.",
"data": {
"id": 314,
"name": "Sales Bridge - Updated",
"slug": "sales-bridge-001",
"numbers": [
{
"id": 501,
"number": "+1234567890",
"status": "active"
}
]
}
}
{
"status_code": 404,
"message": "Bridge not found."
}
Update Bridge
Partially update an existing telephony bridge’s configuration. Currently supports updating the bridge’s display name.Prerequisites: Make sure you have your API Token and Org-Handle ready. See Authentication for details.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| slug | string | Yes | Unique bridge slug |
You can get the bridge
slug by hitting the Get All Bridges API. The slug field in the response is your Bridge Slug.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 |
Request Body
All fields are optional - include only the fields you wish to update.| Field | Type | Required | Description |
|---|---|---|---|
| name | string | No | Updated display name for the bridge |
Response Fields
| Field | Type | Description |
|---|---|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | object | Updated bridge details |
Bridge Object Fields
| Field | Type | Description |
|---|---|---|
| id | integer | Bridge unique identifier |
| name | string | Updated bridge display name |
| slug | string | Unique bridge slug identifier |
| numbers | array | List of assigned phone numbers |
Common Error Codes
| Status Code | Description |
|---|---|
| 200 | Success - Bridge updated successfully |
| 400 | Bad Request - Invalid update parameters |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Invalid organization handle |
| 404 | Not Found - Bridge not found |
| 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'
};
// Update a bridge
const updateBridge = async (slug, updates) => {
const response = await axios.patch(
`https://unpod.ai/api/v2/platform/telephony/bridges/${slug}/`,
updates,
{ headers }
);
console.log(`Bridge updated: ${response.data.data.name}`);
return response.data.data;
};
// Example usage
updateBridge('sales-bridge-001', { name: 'Sales Bridge - Updated' });
import requests
headers = {
'Authorization': 'Token your-api-token',
'Org-Handle': 'your-org-handle',
'Content-Type': 'application/json'
}
def update_bridge(slug: str, updates: dict):
"""Update an existing telephony bridge"""
url = f'https://unpod.ai/api/v2/platform/telephony/bridges/{slug}/'
response = requests.patch(url, headers=headers, json=updates)
data = response.json()
print(f"Bridge updated: {data['data']['name']}")
return data['data']
# Example usage
update_bridge('sales-bridge-001', {'name': 'Sales Bridge - Updated'})
# Update a bridge name
curl -X PATCH "https://unpod.ai/api/v2/platform/telephony/bridges/sales-bridge-001/" \
-H "Authorization: Token your-api-token" \
-H "Org-Handle: your-org-handle" \
-H "Content-Type: application/json" \
-d '{
"name": "Sales Bridge - Updated"
}'
Best Practices
- Partial Updates: Only include fields you want to change - PATCH supports partial updates
- Slug Immutable: The
slugcannot be changed after creation - use descriptive slugs from the start - Verify Before Update: Use Get Bridge by Slug to confirm the bridge exists before patching
- Error Handling: Handle 404 errors when the bridge slug is invalid or the bridge has been deleted
- Security: Keep API tokens secure and rotate them regularly
Was this page helpful?
⌘I
Update Bridge
curl --request PATCH \
--url https://unpod.ai/api/v2/platform/telephony/bridges/{slug}/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Org-Handle: <org-handle>' \
--data '
{
"name": "Sales Bridge — Updated"
}
'import requests
url = "https://unpod.ai/api/v2/platform/telephony/bridges/{slug}/"
payload = { "name": "Sales Bridge — Updated" }
headers = {
"Org-Handle": "<org-handle>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Org-Handle': '<org-handle>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Sales Bridge — Updated'})
};
fetch('https://unpod.ai/api/v2/platform/telephony/bridges/{slug}/', 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/{slug}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Sales Bridge — Updated'
]),
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/{slug}/"
payload := strings.NewReader("{\n \"name\": \"Sales Bridge — Updated\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://unpod.ai/api/v2/platform/telephony/bridges/{slug}/")
.header("Org-Handle", "<org-handle>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sales Bridge — Updated\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://unpod.ai/api/v2/platform/telephony/bridges/{slug}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Org-Handle"] = '<org-handle>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Sales Bridge — Updated\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 200,
"message": "Bridge updated successfully.",
"data": {
"id": 314,
"name": "Sales Bridge - Updated",
"slug": "sales-bridge-001",
"numbers": [
{
"id": 501,
"number": "+1234567890",
"status": "active"
}
]
}
}
{
"status_code": 404,
"message": "Bridge not found."
}