PBX (3CX)
Manage 3CX phone system integrations including hosts, origins, call records, call logs, and audit trails.
Auth required: Yes (auth:api) for all endpoints.
The PBX section covers 3CX phone system integrations: hosts, calls, call logs, and audits.
Model Properties
3CX Host (pbx3cx_host)
| Property | Type | Required | Description |
|---|---|---|---|
id |
integer | auto | Unique identifier |
customer_file_id |
integer | No | FK to customer_files. The file this PBX is provisioned for |
host_name |
string | Yes | Hostname or FQDN of the 3CX instance |
code |
string | No | Auto-generated internal code identifier |
active |
boolean | No | Whether this host is active (default: true) |
ip_address |
string | No | IP address of the 3CX host |
web_username |
string | No | 3CX web admin username |
web_password |
string | No | 3CX web admin password |
ssh_username |
string | No | SSH username (default: phonesystem) |
ssh_password |
string | No | SSH password |
ssh_key |
string | No | SSH private key for key-based authentication |
licence_key |
string | No | 3CX licence key |
licence_type |
string | No | 3CX licence type (e.g. Standard, Pro, Enterprise) |
licence_activation_date |
date | No | Date when the licence was activated |
licence_renewal_date |
date | No | Date when the licence is due for renewal |
sbc_aliases |
string | No | SBC (Session Border Controller) aliases |
backups_location |
string | No | Path to backups on the 3CX server |
fetch_backups |
boolean | No | Whether to automatically fetch backups (default: false) |
backups_frequency |
integer | No | Backup fetch frequency in minutes (default: 1440 = daily) |
fetch_cdr |
boolean | No | Whether to fetch CDR (Call Detail Records) (default: false) |
cdr_frequency |
integer | No | CDR fetch frequency in minutes (default: 1440) |
push_cdr |
boolean | No | Whether to push CDR data to an external system |
fetch_recordings |
boolean | No | Whether to fetch call recordings (default: false) |
recordings_frequency |
integer | No | Recordings fetch frequency in minutes (default: 1440) |
push_recordings |
boolean | No | Whether to push recordings to storage |
make_csv_data |
boolean | No | Whether to generate CSV exports from CDR data |
cl_calls_is_sync |
boolean | No | Sync 3CX call logs to the unified call log (default: true) |
cl_participants_is_sync |
boolean | No | Sync call participants (default: true) |
pbx_map |
longtext | No | JSON mapping of extensions, queues, and ring groups for this PBX |
comment |
text | No | Internal notes |
created_at |
datetime | auto | Creation timestamp |
updated_at |
datetime | auto | Last update timestamp |
3CX Hosts
Base URL: /api/v1/pbx3cx-hosts
Note: /api/v1/pbx3cx_hosts is a deprecated alias (camelCase) for the same resource.
GET /v1/pbx3cx-hosts
List all 3CX hosts.
Query parameters:
| Parameter | Type | Description |
|---|---|---|
customer_id |
integer | Filter by customer |
Response 200: Array of 3CX host objects.
Examples:
curl -s -X GET "https://your-instance.bluerocktel.net/api/v1/pbx3cx-hosts?customer_id=42" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
response = requests.get(
"https://your-instance.bluerocktel.net/api/v1/pbx3cx-hosts",
params={"customer_id": 42},
headers={"Authorization": "Bearer YOUR_API_TOKEN"}
)
hosts = response.json()
$response = Http::withToken('YOUR_API_TOKEN')
->get('https://your-instance.bluerocktel.net/api/v1/pbx3cx-hosts', [
'customer_id' => 42,
]);
$hosts = $response->json();
const response = await fetch(
"https://your-instance.bluerocktel.net/api/v1/pbx3cx-hosts?customer_id=42",
{
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
}
);
const hosts = await response.json();
POST /v1/pbx3cx-hosts
Create a new 3CX host. A code is auto-generated.
Body (JSON): Validated via pbx3cx_host::rules()['store'].
Response 201: Created host object.
GET /v1/pbx3cx-hosts/{id}
Get a single 3CX host by ID.
Response 200: Host object. Response 404: Not found.
PUT /v1/pbx3cx-hosts/{id}
Update a 3CX host.
Body (JSON): Validated via pbx3cx_host::rules()['update'].
Response 201: Updated host object.
DELETE /v1/pbx3cx-hosts/{id}
Delete a 3CX host.
Response 201: Success message.
3CX Origins
GET /v1/pbx3cx/{pbx3cx}/origins
Get the available origins for a specific 3CX host. Used for routing configuration.
URL parameters:
| Parameter | Type | Description |
|---|---|---|
pbx3cx |
integer | 3CX host ID |
Response 200: Array of origin objects.
Examples:
curl -s -X GET "https://your-instance.bluerocktel.net/api/v1/pbx3cx/5/origins" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
response = requests.get(
"https://your-instance.bluerocktel.net/api/v1/pbx3cx/5/origins",
headers={"Authorization": "Bearer YOUR_API_TOKEN"}
)
origins = response.json()
$response = Http::withToken('YOUR_API_TOKEN')
->get('https://your-instance.bluerocktel.net/api/v1/pbx3cx/5/origins');
$origins = $response->json();
const response = await fetch(
"https://your-instance.bluerocktel.net/api/v1/pbx3cx/5/origins",
{
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
}
);
const origins = await response.json();
3CX Calls
Base URL: /api/v1/pbx3cx_calls
Standard CRUD (resource routes)
| Method | Route | Description |
|---|---|---|
| GET | /v1/pbx3cx_calls |
List all 3CX call records |
| POST | /v1/pbx3cx_calls |
Log a new 3CX call |
| GET | /v1/pbx3cx_calls/{id} |
Get a single call record |
| PUT | /v1/pbx3cx_calls/{id} |
Update a call record |
| DELETE | /v1/pbx3cx_calls/{id} |
Delete a call record |
3CX Call Logs
Base URL: /api/v1/pbx3cx-call-logs
Call logs are aggregated call session records from 3CX.
GET /v1/pbx3cx-call-logs
List all visible call log entries.
Response 200: Array of call log objects.
Examples:
curl -s -X GET "https://your-instance.bluerocktel.net/api/v1/pbx3cx-call-logs" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
response = requests.get(
"https://your-instance.bluerocktel.net/api/v1/pbx3cx-call-logs",
headers={"Authorization": "Bearer YOUR_API_TOKEN"}
)
call_logs = response.json()
$response = Http::withToken('YOUR_API_TOKEN')
->get('https://your-instance.bluerocktel.net/api/v1/pbx3cx-call-logs');
$callLogs = $response->json();
const response = await fetch(
"https://your-instance.bluerocktel.net/api/v1/pbx3cx-call-logs",
{
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
}
);
const callLogs = await response.json();
POST /v1/pbx3cx-call-logs
Create a new call log entry. Triggers a refresh of call log data.
Body (JSON): Validated via pbx3cx_call_log::rules()['store'].
Response 201: Created call log object.
GET /v1/pbx3cx-call-logs/{id}
Get a single call log entry by ID.
Response 200: Call log object. Response 404: Not found.
3CX Call Log Details
GET /v1/pbx3cx-call-log-details/{id}
Get detailed call log information for a specific call log ID.
URL parameters:
| Parameter | Type | Description |
|---|---|---|
id |
integer | Call log ID |
Response 200: Call log detail object. Response 404: Not found.
3CX Audits
Base URL: /api/v1/pbx3cx-audits
Audit records for 3CX configuration changes.
Standard CRUD (resource routes)
| Method | Route | Description |
|---|---|---|
| GET | /v1/pbx3cx-audits |
List all audit records |
| POST | /v1/pbx3cx-audits |
Create an audit record |
| GET | /v1/pbx3cx-audits/{id} |
Get a single audit record |
| PUT | /v1/pbx3cx-audits/{id} |
Update an audit record |
| DELETE | /v1/pbx3cx-audits/{id} |
Delete an audit record |
Helper: 3CX Countries
GET /v1/helpers/3cxCountries
Get the list of countries supported by 3CX (for PBX configuration).
Auth required: No
Response 200: Array of country objects.
Examples:
curl -s -X GET "https://your-instance.bluerocktel.net/api/v1/helpers/3cxCountries" \
-H "Accept: application/json"
import requests
response = requests.get(
"https://your-instance.bluerocktel.net/api/v1/helpers/3cxCountries"
)
countries = response.json()
$response = Http::get('https://your-instance.bluerocktel.net/api/v1/helpers/3cxCountries');
$countries = $response->json();
const response = await fetch(
"https://your-instance.bluerocktel.net/api/v1/helpers/3cxCountries",
{
headers: { "Accept": "application/json" }
}
);
const countries = await response.json();
Helper: 3CX Open Destinations
GET /v1/helpers/3cxOpenDestinations
Get the list of open/unrestricted destinations for 3CX routing.
Auth required: No
Response 200: Array of destination objects.
On this page