Provider Configurations API
The Provider Configurations API allows you to manage telephony provider configurations. You can list, create, retrieve, update, and delete provider configurations for your telephony services.Get All Provider Configurations
Fetch information about all configured telephony providers to help identify and manage available calling services.Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | API Key format: Token <token> |
Example Request
Success Response (200)
Response Fields
| Field | Type | Description |
|---|---|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | array | Array of provider configuration objects |
Configuration Object Fields
| Field | Type | Description |
|---|---|---|
| id | integer | Configuration unique identifier |
| name | string | Configuration name |
| provider | integer | Provider ID |
| provider_details | object | Provider information |
| org_handle | string | Organization domain handle |
| meta_json | array | Additional metadata key-value pairs |
| active | boolean | Whether the configuration is active |
| api_key | string | Provider API key |
| api_secret | string | Provider API secret |
| base_url | string | Provider base URL |
| sip_url | string | SIP URL for VoIP |
Error Response (401 Unauthorized)
Create Provider Configuration
Create or update telephony provider settings by sending the required configuration details in the request body.Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Org-Handle | string | Yes | Organization domain handle |
| Authorization | string | Yes | API Key format: Token <token> |
Example Request
Success Response (200)
Response Fields
| Field | Type | Description |
|---|---|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | object | Created configuration details |
Configuration Object Fields
| Field | Type | Description |
|---|---|---|
| id | integer | Configuration unique identifier |
| name | string | Configuration name |
| provider | integer | Provider ID |
| provider_details | object | Provider information |
| org_handle | string | Organization domain handle |
| meta_json | array | Additional metadata key-value pairs |
| active | boolean | Whether the configuration is active |
| api_key | string | Provider API key |
| api_secret | string | Provider API secret |
| base_url | string | Provider base URL |
| sip_url | string | SIP URL for VoIP |
Error Response (401 Unauthorized)
Get Provider Configuration by ID
Retrieve complete telephony provider configuration data for a specific ID, allowing you to view settings stored in the system.Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Configuration unique identifier |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Org-Handle | string | Yes | Organization domain handle |
| Product-ID | integer | Yes | Product identifier |
Example Request
Success Response (200)
Response Fields
| Field | Type | Description |
|---|---|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | object | Configuration details |
Configuration Object Fields
| Field | Type | Description |
|---|---|---|
| id | integer | Configuration unique identifier |
| name | string | Configuration name |
| provider | integer | Provider ID |
| provider_details | object | Provider information |
| org_handle | string | Organization domain handle |
| meta_json | array | Additional metadata key-value pairs |
| active | boolean | Whether the configuration is active |
| api_key | string | Provider API key |
| api_secret | string | Provider API secret |
| base_url | string | Provider base URL |
| sip_url | string | SIP URL for VoIP |
Error Response (401 Unauthorized)
Update Provider Configuration
Partially modify a telephony provider’s configuration, enabling you to update only the required attributes without replacing the entire record.Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Configuration unique identifier |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Org-Handle | string | Yes | Organization domain handle |
| Product-ID | integer | Yes | Product identifier |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | No | Updated configuration name |
| api_key | string | No | Updated provider API key |
| api_secret | string | No | Updated provider API secret |
| active | boolean | No | Enable/disable configuration |
| base_url | string | No | Updated provider base URL |
| sip_url | string | No | Updated SIP URL |
Example Request
Success Response (200)
Response Fields
| Field | Type | Description |
|---|---|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | object | Configuration details |
Configuration Object Fields
| Field | Type | Description |
|---|---|---|
| id | integer | Configuration unique identifier |
| name | string | Configuration name |
| provider | integer | Provider ID |
| provider_details | object | Provider information |
| org_handle | string | Organization domain handle |
| meta_json | array | Additional metadata key-value pairs |
| active | boolean | Whether the configuration is active |
| api_key | string | Provider API key |
| api_secret | string | Provider API secret |
| base_url | string | Provider base URL |
| sip_url | string | SIP URL for VoIP |
Error Response (401 Unauthorized)
Delete Provider Configuration
Permanently delete a telephony provider’s configuration identified by ID, ensuring it is no longer available or used in the platform.Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Configuration unique identifier |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Org-Handle | string | Yes | Organization domain handle |
| Product-ID | integer | Yes | Product identifier |
Example Request
Success Response (204)
Response Fields
| Field | Type | Description |
|---|---|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | object | Empty object |
Error Response (401 Unauthorized)
Common Error Codes
| Status Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 204 | No Content - Resource deleted successfully |
| 400 | Bad Request - Invalid parameters provided |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Access denied to the resource |
| 404 | Not Found - Configuration not found |
| 500 | Internal Server Error - Server-side error |
Code Examples
Best Practices
- Secure Credentials: Never expose API keys or secrets in client-side code
- Configuration Naming: Use descriptive names to easily identify configurations
- Provider Selection: Choose the appropriate provider based on your region and requirements
- Validation: Verify provider credentials before saving configurations
- Cleanup: Delete unused configurations to maintain a clean setup
- Error Handling: Always handle potential errors and implement retry logic
- Security: Keep API tokens secure and rotate them regularly
- Backup: Keep a record of configuration details before making changes