List departments for the tenant (user)
Returns the full list of departments belonging to the PBX tenant, each serialized by the V1 DepartmentResource with clean field names (id, name, description). Departments are a per-tenant catalog of organizational units used across the Tempus time and attendance module. The authenticated user must belong to the PBX identified by the path parameter, otherwise the request is rejected with 403. The result is not paginated: the complete list is returned as a top-level array. This is the properly named replacement for the legacy groups endpoint, which returns the same records under legacy key names.
User bearer token. Default authentication for customer-facing endpoints.
Obtain a token by calling POST /login with your credentials, then send it
on every subsequent request as Authorization: Bearer <token>. The token
inherits the permissions and PBX scope of the authenticated user.
- HTTP Authorization Scheme
bearer- Bearer format
Bearer <token>
application/jsonResponses
550e8400-e29b-41d4-a716-446655440000Customer SupportHandles inbound customer requestsAuthorization Token is missingmessagearray<string>
https://cockpit.voxbi.com/api/v1/{pbx_id}/departments
curl -X GET 'https://cockpit.voxbi.com/api/v1/{pbx_id}/departments' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/departments', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://cockpit.voxbi.com/api/v1/{pbx_id}/departments',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
'http' => [
'method' => 'GET',
'header' => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/{pbx_id}/departments', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"message": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057