Update a schedule (user)
Updates a schedule. Every field is optional: send only what changes. The caller must hold the schedules-management permission and manage at least some of the schedule's people; otherwise a 404 is returned.
Scope: send scope_type with the matching selection to change who the schedule is for. The new selection REPLACES the previous one. An update that mentions none of scope_type, companies, departments, employees or department_id leaves the scope exactly as it was, so a plain rename is safe. day_start_time and day_end_time must be sent together.
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/jsonRequest body · required
Reception (summer)company department employeesemployeescompaniesarray<string>
departmentsarray<string>
employeesarray<string>
550e8400-e29b-41d4-a716-446655440001days_of_weekarray<integer>
08:0017:00550e8400-e29b-41d4-a716-446655440003status_filtersarray<string>
Responses
550e8400-e29b-41d4-a716-446655440000Sales Team Weekly Plandepartmentobject | null
550e8400-e29b-41d4-a716-446655440001Customer Supportcompany department employeesdepartmentscope*object
companies*array<object>
550e8400-e29b-41d4-a716-446655440020Northwind Tradingdepartments*array<object>
550e8400-e29b-41d4-a716-446655440001Customer Supportemployees*array<object>
550e8400-e29b-41d4-a716-446655440010Jane Smithdepartments*array<object>
550e8400-e29b-41d4-a716-446655440001Customer Supportemployees*array<object>
550e8400-e29b-41d4-a716-446655440010Jane Smith550e8400-e29b-41d4-a716-446655440002Customer SupportdaysOfWeek*array<integer>
1 2 3 4 5 6 7109:0017:3030statusobject | null
550e8400-e29b-41d4-a716-446655440002AvailablesubStatusobject | null
550e8400-e29b-41d4-a716-446655440003On BreakstatusFilters*array<string>
550e8400-e29b-41d4-a716-44665544000212024-03-01T08:29:07+00:002024-03-01T08:29:07+00:00Authorization Token is missingmessagearray<string>
The given data was invalid.errorsobject
filterarray<string>
sortarray<string>
pagearray<string>
per_pagearray<string>
https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}
curl -X PUT 'https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
--data '{"name":"Reception (summer)"}'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
body: JSON.stringify({
"name": "Reception (summer)"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.put('https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'},
json={
"name": "Reception (summer)"
}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
'http' => [
'method' => 'PUT',
'header' => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
'content' => '{
\"name\": \"Reception (summer)\"
}',
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"message": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"errors": { … }
"filter": [ … ],
"sort": [ … ],
"page": [ … ],
"per_page": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057