Skip to main content
PATCH
/
api
/
v2
/
platform
/
telephony
/
bridges
/
{slug}
Update Bridge
curl --request PATCH \
  --url http://localhost:3001/api/v2/platform/telephony/bridges/{slug}/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Org-Handle: <org-handle>' \
  --data '
{
  "name": "Updated Sales Bridge"
}
'
{
  "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": 200,
  "message": "Bridge updated successfully.",
  "data": {
    "id": 314,
    "name": "Sales Bridge — Updated",
    "slug": "sales-bridge-001",
    "numbers": [
      {
        "id": 501,
        "number": "+1234567890",
        "status": "active"
      }
    ]
  }
}

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

NameTypeRequiredDescription
slugstringYesUnique 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

NameTypeRequiredDescription
AuthorizationstringYesAPI Key format: Token <token>
Org-HandlestringYesOrganization domain handle
Content-TypestringYesapplication/json

Request Body

All fields are optional — include only the fields you wish to update.
FieldTypeRequiredDescription
namestringNoUpdated display name for the bridge

Response Fields

FieldTypeDescription
status_codeintegerHTTP status code
messagestringResponse message
dataobjectUpdated bridge details

Bridge Object Fields

FieldTypeDescription
idintegerBridge unique identifier
namestringUpdated bridge display name
slugstringUnique bridge slug identifier
numbersarrayList of assigned phone numbers

Common Error Codes

Status CodeDescription
200Success - Bridge updated successfully
400Bad Request - Invalid update parameters
401Unauthorized - Invalid or missing API token
403Forbidden - Invalid organization handle
404Not Found - Bridge not found
500Internal 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.dev/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' });

Best Practices

  1. Partial Updates: Only include fields you want to change — PATCH supports partial updates
  2. Slug Immutable: The slug cannot be changed after creation — use descriptive slugs from the start
  3. Verify Before Update: Use Get Bridge by Slug to confirm the bridge exists before patching
  4. Error Handling: Handle 404 errors when the bridge slug is invalid or the bridge has been deleted
  5. Security: Keep API tokens secure and rotate them regularly

Authorizations

Authorization
string
header
required

Format: Token

Headers

Org-Handle
string
required

Organization domain handle

Example:

"unpod"

Path Parameters

slug
string
required
Example:

"sales-bridge"

Body

application/json
name
string
Example:

"Updated Sales Bridge"

Response

Bridge updated