Skip to content

List the employees a schedule may assign (user or API key)

get /{pbx_id}/schedule-management/{schedule}/employees

Returns the people who may be booked into this schedule's slots: its scope resolved for you, whether that scope is whole companies, several departments, or a hand-picked list. Use it to populate the assignment dropdown on the slot create and edit forms. Booking anybody outside this list is refused with a 422.

Only employees holding a contract that is active today are listed, whatever the scope type — a hand-picked selection does not override the contract, so somebody who has left or has not started yet is left out.

Reading only requires a token belonging to the PBX, like the other schedule GET endpoints. The same list is embedded as employees on every schedule payload, so a client that already loaded the schedule does not need this call.

This replaces the former approach of calling GET /{pbx_id}/users?filter[group_id]=<the schedule's group>, which only ever worked for single-department schedules and under-reports for company and employee scoped ones.

HTTP: bearerAuth

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>
HTTP: IntegrationApiKey

API key created on the Cockpit Integrations page (an "API key" integration). It is a bearer token owned by the customer's PBX and limited to the scopes selected when the key was created (e.g. phone-numbers, push-configuration).

Send it in the Authorization header:

Authorization: Bearer <api_key>

Manage keys (create / reveal / revoke) from Integrations → New integration → API key.

HTTP Authorization Scheme
bearer
pbx_id path · string · uuid *
UUID of the PBX tenant.
schedule path · string · uuid *
UUID of the schedule.
accept header · string
example: application/json

Responses

The employees the schedule may assign, ordered by name.
Response schema
dataarray<object>
Each item — One assignable person of a schedule: an employee the schedule's scope covers and who may therefore be booked into its slots. Only employees holding a contract that is active today are listed — someone who has left, and someone whose contract has not started yet, is left out whatever the scope type, including a hand-picked `employees` selection. The schedule's `scope` still echoes the raw selection, so an edit form can round-trip what was picked. The department is the one on the employee's most recent contract, supplied so a picker can group or label its options when the schedule spans more than one department. Both department fields are null for an employee whose contract carries no department, which is normal for a company-scoped schedule.
id*string · uuid
Unique identifier of the employee.
example: 550e8400-e29b-41d4-a716-446655440010
fullName*string
Display name of the employee, ordered according to the tenant's first-name or last-name-first preference.
example: Jane Smith
departmentId*string | null · uuid
Identifier of the department on the employee's most recent contract. Null when that contract carries no department.
example: 550e8400-e29b-41d4-a716-446655440002
departmentName*string | null
Display name of the department on the employee's most recent contract. Null when that contract carries no department.
example: Customer Support
Authorization Token Missing. This error is returned when the authorization token is missing.
Response schema
errorstring
Error message
example: Authorization Token is missing
The authenticated user is outside the requested tenant. A PBX API key is rejected with 403 when it does not carry the `tempus-schedules` scope or when `pbx_id` is not the key's own PBX. The schedules-management scope and employee-scope cases above apply to user tokens only: a key reaches every department and employee of its own PBX.
Response schema
messagestring
Data Not Found. This error is returned when the requested data is not found.
Response schema
messagearray<string>
[]string
Too Many Requests. The rate limit for this action has been exceeded. Retry after the window indicated by the Retry-After header.
Response schema
messagestring
get https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}/employees
Base URL
Request sample
curl -X GET 'https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}/employees' \
  -H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}/employees', {
  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}/schedule-management/{schedule}/employees',
    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}/schedule-management/{schedule}/employees', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
"data": [ … ]
{ … },
"id": "550e8400-e29b-41d4-a716-446655440010",
"fullName": "Jane Smith",
"departmentId": "550e8400-e29b-41d4-a716-446655440002",
"departmentName": "Customer Support"
},
{ … }
"id": "550e8400-e29b-41d4-a716-446655440011",
"fullName": "John Baker",
"departmentId": null,
"departmentName": null
}
]
}
{ … }
"error": "Authorization Token is missing"
}
Cache-Control string
example: private, must-revalidate
Connection string
example: keep-alive
Content-Type string
example: application/json
Vary string
example: Origin
X-RateLimit-Limit integer
Max requests allowed in the current rate-limit window.
example: 60
X-RateLimit-Remaining integer
Requests remaining in the current rate-limit window.
example: 57
{ … }
"message": "You do not have access to this PBX."
}
{ … }
"message": [ … ]
"Data not found"
]
}
Cache-Control string
example: private, must-revalidate
Connection string
example: keep-alive
Content-Type string
example: application/json
Vary string
example: Origin
X-RateLimit-Limit integer
Max requests allowed in the current rate-limit window.
example: 60
X-RateLimit-Remaining integer
Requests remaining in the current rate-limit window.
example: 57
{ … }
"message": "Too Many Attempts."
}
Retry-After integer
Seconds to wait before retrying.
example: 60
Content-Type string
example: application/json