Skip to main content
GET
/
api
/
v2
/
platform
/
telephony
/
bridges
Get All Bridges
curl --request GET \
  --url http://localhost:3001/api/v2/platform/telephony/bridges/ \
  --header 'Authorization: <api-key>' \
  --header 'Org-Handle: <org-handle>'
{
  "count": 6,
  "status_code": 200,
  "message": "Bridges fetched successfully.",
  "data": [
    {
      "id": 314,
      "name": "Sales Bridge",
      "slug": "sales-bridge-001",
      "provider": "twilio",
      "numbers": [
        {
          "id": 501,
          "number": "+1234567890",
          "status": "active"
        }
      ]
    }
  ]
}
{
  "count": 6,
  "status_code": 200,
  "message": "Bridges fetched successfully.",
  "data": [
    {
      "id": 314,
      "name": "Sales Bridge",
      "slug": "sales-bridge-001",
      "provider": "twilio",
      "numbers": [
        {
          "id": 501,
          "number": "+1234567890",
          "status": "active"
        }
      ]
    }
  ]
}

Get All Bridges

Retrieve a list of all telephony bridges in your organization, including their IDs, names, slugs, associated providers, and linked phone numbers for monitoring and call-routing management.
Prerequisites: Make sure you have your API Token and Org-Handle ready. See Authentication for details.

Headers

NameTypeRequiredDescription
AuthorizationstringYesAPI Key format: Token <token>
Org-HandlestringYesOrganization domain handle
You can get the Org-Handle by hitting the Get All Organizations API. The domain_handle field in the response is your Org-Handle.

Response Fields

FieldTypeDescription
countintegerTotal number of bridges
status_codeintegerHTTP status code
messagestringResponse message
dataarrayArray of bridge objects

Bridge Object Fields

FieldTypeDescription
idintegerBridge unique identifier
namestringBridge display name
slugstringUnique bridge slug identifier
providerstringConnected provider slug (null if none)
numbersarrayList of phone numbers assigned to the bridge

Number Object Fields

FieldTypeDescription
idintegerNumber assignment ID
numberstringPhone number (E.164 format)
statusstringNumber status: active, inactive

Common Error Codes

Status CodeDescription
200Success - Bridges fetched successfully
401Unauthorized - Invalid or missing API token
403Forbidden - Invalid organization handle
500Internal Server Error - Server-side error

Code Examples

const axios = require('axios');

const headers = {
  'Authorization': 'Token your-api-token',
  'Org-Handle': 'your-org-handle'
};

// Get all bridges
const getAllBridges = async () => {
  const response = await axios.get(
    'https://unpod.dev/api/v2/platform/telephony/bridges/',
    { headers }
  );
  console.log(`Total bridges: ${response.data.count}`);
  response.data.data.forEach(bridge => {
    console.log(`${bridge.name} (${bridge.slug}) - Numbers: ${bridge.numbers.length}`);
  });
  return response.data.data;
};

// Example usage
getAllBridges();

Best Practices

  1. Bridge Slug: Note each bridge’s slug — it is used as a path parameter in other bridge endpoints
  2. Provider Check: Verify bridges have a connected provider before routing calls through them
  3. Number Assignment: Bridges without numbers in the numbers[] array cannot receive inbound calls
  4. Error Handling: Always handle potential errors and edge cases
  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"

Response

List of all bridges