Bridges API
The Bridges API allows you to manage telephony bridges for connecting multiple call participants. Bridges are used for call routing, conferencing, and managing telephony channels.
Prerequisites: Make sure you have your API Token. See Authentication for details.
Create Telephony Bridge
Create a new telephony bridge with the specified configuration for use in call routing or conferencing.
POST /api/v2/platform/telephony/bridges/
| Name | Type | Required | Description |
|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Org-Handle | string | Yes | Organization domain handle |
| Product-ID | string | Yes | Product identifier |
| 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 | Bridge name |
| description | string | No | Bridge description |
| region | string | No | Region code (e.g., IN, US) |
Example Request
POST /api/v2/platform/telephony/bridges/
Headers:
Authorization: Token your-api-token
Org-Handle: your-org-handle
Product-ID: your-product-id
Content-Type: application/json
Body:
{
"name": "Support Bridge",
"description": "Bridge for customer support",
"region": "US"
}
Success Response (201)
{
"status_code": 201,
"message": "Bridge created successfully.",
"data": {
"id": 314,
"name": "Support Bridge",
"description": "",
"status": "ACTIVE",
"documents_status": "pending",
"slug": "support-bridge-abc123",
"numbers": [],
"hub": 1,
"region": "IN",
"organization": {
"logo": "https://example.com/org-logo.png",
"account_type": "influencer",
"seeking": [
"marketplace"
],
"tags": [
"finance",
"retail"
],
"org_id": 1,
"created": "2023-05-06T10:49:24.027999Z",
"modified": "2025-08-26T06:57:37.047004Z",
"name": "My Organization",
"token": "YOUR_ORG_TOKEN",
"domain": "example.com",
"domain_handle": "example.com",
"is_private_domain": true,
"privacy_type": "shared",
"color": "#99B0AF",
"org_type": "pro",
"status": "active"
}
}
}
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 name |
| description | string | Bridge description |
| status | string | Bridge status |
| documents_status | string | Document verification status |
| slug | string | Unique bridge slug identifier |
| numbers | array | Assigned numbers (empty on creation) |
| hub | integer | Hub identifier |
| region | string | Region code |
| organization | object | Organization details |
Organization Object Fields
| Field | Type | Description |
|---|
| logo | string | Organization logo URL |
| account_type | string | Account type |
| seeking | array | Seeking categories |
| tags | array | Organization tags |
| org_id | integer | Organization ID |
| created | string | Creation timestamp |
| modified | string | Last modified timestamp |
| name | string | Organization name |
| token | string | Organization token |
| domain | string | Organization domain |
| domain_handle | string | Domain handle |
| is_private_domain | boolean | Whether domain is private |
| privacy_type | string | Privacy type |
| color | string | Organization color |
| org_type | string | Organization type |
| status | string | Organization status |
Error Response (400 — Bad Request)
{
"status_code": 400,
"message": "Bridge creation failed.",
"errors": "Name is required"
}
Get All Telephony Bridges
Retrieve a list of all telephony bridges in the system, including their IDs, status, type, and associated numbers for monitoring and call-routing management.
GET /api/v2/platform/telephony/bridges/
| Name | Type | Required | Description |
|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Org-Handle | string | Yes | Organization domain handle |
| Product-ID | string | Yes | Product identifier |
Example Request
GET /api/v2/platform/telephony/bridges/
Headers:
Authorization: Token your-api-token
Org-Handle: your-org-handle
Product-ID: your-product-id
Success Response (200)
{
"count": 6,
"status_code": 200,
"message": "Success",
"data": [
{
"id": 348,
"name": "test",
"slug": "test-1f5evfn7",
"status": "ACTIVE",
"description": ""
}
]
}
Response Fields
| Field | Type | Description |
|---|
| count | integer | Total number of bridges |
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | array | Array of bridge objects |
Bridge Object Fields
| Field | Type | Description |
|---|
| id | integer | Bridge unique identifier |
| name | string | Bridge name |
| slug | string | Unique bridge slug identifier |
| status | string | Bridge status: ACTIVE, DRAFT, INACTIVE |
| description | string | Bridge description |
Error Response (400 — Bad Request)
{
"status_code": 400,
"message": "Invalid request parameters",
"errors": "Detailed error description"
}
Get Bridge by Slug
Retrieve details of a specific telephony bridge using its unique slug identifier.
GET /api/v2/platform/telephony/bridges/{slug}/
Path Parameters
| Name | Type | Required | Description |
|---|
| slug | string | Yes | Unique bridge slug |
| Name | Type | Required | Description |
|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Org-Handle | string | Yes | Organization domain handle |
| Product-ID | string | Yes | Product identifier |
Example Request
GET /api/v2/platform/telephony/bridges/sales-bridge-abc123/
Headers:
Authorization: Token your-api-token
Org-Handle: your-org-handle
Product-ID: your-product-id
Success Response (200)
{
"status_code": 200,
"message": "Bridge fetched successfully.",
"data": {
"id": 101,
"name": "Sales Bridge",
"description": "Bridge for sales team calls",
"status": "ACTIVE",
"documents_status": "verified",
"slug": "sales-bridge-abc123",
"numbers": [
{
"id": 501,
"number_id": 25,
"number": "+1234567890",
"state": "ASSIGNED",
"active": true,
"channels_count": 1,
"status": "active"
}
],
"hub": 1,
"region": "US"
}
}
Response Fields
| Field | Type | Description |
|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | object | Bridge details |
Bridge Object Fields
| Field | Type | Description |
|---|
| id | integer | Bridge unique identifier |
| name | string | Bridge name |
| description | string | Bridge description |
| status | string | Bridge status |
| documents_status | string | Document verification status |
| slug | string | Unique bridge slug |
| numbers | array | Assigned phone numbers |
| hub | integer | Hub identifier |
| region | string | Region code |
Number Object Fields
| Field | Type | Description |
|---|
| id | integer | Number assignment ID |
| number_id | integer | Phone number ID |
| number | string | Phone number (E.164) |
| state | string | Number state |
| active | boolean | Whether number is active |
| channels_count | integer | Number of channels |
| status | string | Number status |
Error Response (404 — Not Found)
{
"status_code": 404,
"message": "Bridge not found.",
"errors": "No bridge exists with the provided slug"
}
Update Telephony Bridge
Update an existing telephony bridge’s configuration or status.
PATCH /api/v2/platform/telephony/bridges/{slug}/
Path Parameters
| Name | Type | Required | Description |
|---|
| slug | string | Yes | Unique bridge slug |
| Name | Type | Required | Description |
|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Org-Handle | string | Yes | Organization domain handle |
| Product-ID | string | Yes | Product identifier |
| Content-Type | string | Yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|
| name | string | No | Updated bridge name |
| description | string | No | Updated bridge description |
| status | string | No | Updated status: ACTIVE, DRAFT, etc. |
Example Request
PATCH /api/v2/platform/telephony/bridges/sales-bridge-abc123/
Headers:
Authorization: Token your-api-token
Org-Handle: your-org-handle
Product-ID: your-product-id
Content-Type: application/json
Body:
{
"name": "Sales Bridge Updated",
"status": "ACTIVE"
}
Success Response (200)
{
"status_code": 200,
"message": "Bridge updated successfully.",
"data": {
"id": 101,
"name": "Sales Bridge Updated",
"description": "Bridge for sales team calls",
"status": "ACTIVE",
"documents_status": "verified",
"slug": "sales-bridge-abc123",
"numbers": [],
"hub": 1,
"region": "US"
}
}
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 | Bridge name |
| description | string | Bridge description |
| status | string | Bridge status |
| documents_status | string | Document verification status |
| slug | string | Unique bridge slug |
| numbers | array | Assigned phone numbers |
| hub | integer | Hub identifier |
| region | string | Region code |
Error Response (400 — Bad Request)
{
"status_code": 400,
"message": "Bridge update failed.",
"errors": "Invalid status value"
}
Delete Telephony Bridge
Remove an existing telephony bridge from the system, freeing its associated resources.
DELETE /api/v2/platform/telephony/bridges/{slug}/
Path Parameters
| Name | Type | Required | Description |
|---|
| slug | string | Yes | Unique bridge slug |
| Name | Type | Required | Description |
|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Org-Handle | string | Yes | Organization domain handle |
| Product-ID | string | Yes | Product identifier |
Example Request
DELETE /api/v2/platform/telephony/bridges/support-bridge-xyz789/
Headers:
Authorization: Token your-api-token
Org-Handle: your-org-handle
Product-ID: your-product-id
Success Response (200)
{
"status_code": 200,
"message": "Bridge deleted successfully.",
"data": {}
}
Response Fields
| Field | Type | Description |
|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | object | Empty object |
Error Response (404 — Not Found)
{
"status_code": 404,
"message": "Bridge not found.",
"errors": "No bridge exists with the provided slug"
}
Connect Provider to Bridge
Connect a provider credential to a specific telephony bridge for enabling call functionality.
The provider_credential_id must be a configuration that is already assigned to the bridge. You can only use a number_id that is linked to the bridge while connect and disconnect provider.
POST /api/v2/platform/telephony/bridges/{slug}/connect-provider/
Path Parameters
| Name | Type | Required | Description |
|---|
| slug | string | Yes | Unique bridge slug |
| Name | Type | Required | Description |
|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Org-Handle | string | Yes | Organization domain handle |
| Product-ID | string | Yes | Product identifier |
| 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 |
|---|
| provider_credential_id | integer | Yes | ID of the provider credential |
Example Request
POST /api/v2/platform/telephony/bridges/sales-bridge-abc123/connect-provider/
Headers:
Authorization: Token your-api-token
Org-Handle: your-org-handle
Product-ID: your-product-id
Content-Type: application/json
Body:
{
"provider_credential_id": 10
}
Success Response (200)
{
"status_code": 200,
"message": "Provider connected to bridge successfully.",
"data": {
"id": 101,
"name": "Sales Bridge",
"slug": "sales-bridge-abc123",
"provider_credential": {
"id": 10,
"name": "Main Provider",
"provider": 3,
"provider_details": {
"id": 3,
"name": "Twilio",
"type": "TELEPHONY"
},
"active": true
}
}
}
Response Fields
| Field | Type | Description |
|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | object | Bridge details |
Bridge Object Fields
| Field | Type | Description |
|---|
| id | integer | Bridge unique identifier |
| name | string | Bridge name |
| slug | string | Unique bridge slug |
| provider_credential | object | Provider credential info |
Provider Credential Object Fields
| Field | Type | Description |
|---|
| id | integer | Credential ID |
| name | string | Credential name |
| provider | integer | Provider ID |
| provider_details | object | Provider details |
| active | boolean | Whether credential active |
Provider Details Object Fields
| Field | Type | Description |
|---|
| id | integer | Provider ID |
| name | string | Provider name |
| type | string | Provider type |
Error Response (400 — Bad Request)
{
"status_code": 400,
"message": "Failed to connect provider.",
"errors": "Provider credential not found or inactive"
}
Disconnect Provider from Bridge
Disconnect a provider credential from a specific telephony bridge.
POST /api/v2/platform/telephony/bridges/{slug}/disconnect-provider/
Path Parameters
| Name | Type | Required | Description |
|---|
| slug | string | Yes | Unique bridge slug |
| Name | Type | Required | Description |
|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Org-Handle | string | Yes | Organization domain handle |
| Product-ID | string | Yes | Product identifier |
| 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 |
|---|
| provider_credential_id | integer | Yes | ID of the provider credential |
Example Request
POST /api/v2/platform/telephony/bridges/sales-bridge-abc123/disconnect-provider/
Headers:
Authorization: Token your-api-token
Org-Handle: your-org-handle
Product-ID: your-product-id
Content-Type: application/json
Body:
{
"provider_credential_id": 10
}
Success Response (200)
{
"status_code": 200,
"message": "Provider disconnected from bridge successfully.",
"data": {
"id": 101,
"name": "Sales Bridge",
"slug": "sales-bridge-abc123",
"provider_credential": null
}
}
Response Fields
| Field | Type | Description |
|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | object | Bridge details |
Bridge Object Fields
| Field | Type | Description |
|---|
| id | integer | Bridge unique identifier |
| name | string | Bridge name |
| slug | string | Unique bridge slug |
| provider_credential | null | Null after provider disconnected |
Error Response (400 — Bad Request)
{
"status_code": 400,
"message": "Failed to disconnect provider.",
"errors": "Provider is not connected to this bridge"
}
Common Error Codes
| Status Code | Description |
|---|
| 200 | Success - Request completed successfully |
| 201 | Created - Resource created successfully |
| 400 | Bad Request - Invalid parameters provided |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Access denied to the resource |
| 404 | Not Found - Bridge or resource 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',
'Product-ID': 'your-product-id',
'Content-Type': 'application/json'
};
// Get all bridges
const getBridges = async () => {
const response = await axios.get(
'https://unpod.dev/api/v2/platform/telephony/bridges/',
{ headers }
);
console.log(`Total bridges: ${response.data.count}`);
return response.data.data;
};
// Create a new bridge
const createBridge = async (name, description, region = 'US') => {
const response = await axios.post(
'https://unpod.dev/api/v2/platform/telephony/bridges/',
{ name, description, region },
{ headers }
);
console.log(`Bridge created: ${response.data.data.slug}`);
return response.data.data;
};
// Get bridge by slug
const getBridgeBySlug = async (slug) => {
const response = await axios.get(
`https://unpod.dev/api/v2/platform/telephony/bridges/${slug}/`,
{ headers }
);
console.log(`Bridge: ${response.data.data.name}`);
return response.data.data;
};
// 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;
};
// Delete a bridge
const deleteBridge = async (slug) => {
const response = await axios.delete(
`https://unpod.dev/api/v2/platform/telephony/bridges/${slug}/`,
{ headers }
);
console.log('Bridge deleted successfully');
return response.data;
};
// Connect provider to bridge
const connectProvider = async (slug, providerCredentialId) => {
const response = await axios.post(
`https://unpod.dev/api/v2/platform/telephony/bridges/${slug}/connect-provider/`,
{ provider_credential_id: providerCredentialId },
{ headers }
);
console.log('Provider connected successfully');
return response.data.data;
};
// Disconnect provider from bridge
const disconnectProvider = async (slug, providerCredentialId) => {
const response = await axios.post(
`https://unpod.dev/api/v2/platform/telephony/bridges/${slug}/disconnect-provider/`,
{ provider_credential_id: providerCredentialId },
{ headers }
);
console.log('Provider disconnected successfully');
return response.data.data;
};
// Example usage
getBridges();
Best Practices
- Bridge Naming: Use descriptive names for bridges to easily identify their purpose
- Status Management: Keep bridges in
DRAFT status until fully configured
- Provider Connection: Connect appropriate provider credentials before activating a bridge
- Error Handling: Always handle potential errors and implement retry logic
- Cleanup: Delete unused bridges to free up resources
- Security: Keep API tokens secure and rotate them regularly
- Monitoring: Monitor bridge status and call quality metrics
- Region Selection: Choose appropriate regions for optimal call quality