Request legal leave for yourself (user)
Request legal leave for yourself. Send the dates and the part of the first and last day you take; the server sizes each day from your work shift and places half days on the clock using the tenant's midday split (12:00 by default).
- A full day needs only
start_date. - A single day can be
full,morning,afternoon, orhourswith astart_timeandend_time. - A range can start with the
afternoonoff and end with themorningoff. Days in between are always full.
Weekends, public holidays and company special holidays in the range are not booked. The request always books legal leave: special leave and illness are recorded by HR, not through this endpoint.
The response has the same shape as an absences entry of the employee's request
list, so the new request renders with the same code.
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 · application/json
2026-08-102026-08-12full morning afternoon hours nullafternoonfull morning nullmorning09:0011:00550e8400-e29b-41d4-a716-446655440020Family tripResponses
absencesabsencesrequest*object
550e8400-e29b-41d4-a716-446655440010absence illness special legal_holiday home_officeabsencepending approved rejected cancelled pending_removalpending550e8400-e29b-41d4-a716-446655440001employeeobject | null
Muller Annarequested_byobject | null
2026-03-04T00:00:00+00:002026-03-06T00:00:00+00:00dates*array<string>
requested_time*object
57600breakdownobject
227360full morning afternoon hours nullafternoonfull morning afternoon hours nullmorningpartial_days*array<object>
2026-10-0513680full morning afternoon hoursafternoon12:00next_availabilityobject
if_approved*object
2026-08-132026-08-171Off from 2026-08-13, available on 2026-08-17current*object
2026-08-12Back on 2026-08-12Family tripvalidatorsarray<object>
Lemaire Faridpending accepted rejected1progress*object | null
Team lead31waiting_on*array<object>
550e8400-e29b-41d4-a716-446655440031Muller Jonasapproved_by*array<object>
550e8400-e29b-41d4-a716-446655440030Lemaire Faridnext_stepobject | null
HR2steps*array<object>
1Team leadpending active completed bypassed rejectedcompletedApproved by Lemaire Farid11validatorsarray<object>
550e8400-e29b-41d4-a716-446655440030Lemaire Faridpending accepted rejectedacceptedsupervisors*array<object>
550e8400-e29b-41d4-a716-446655440032Weber Inespending accepted rejectedpending1Authorization Token is missingYou do not have access to this PBX.User not found.When your leave covers several days, the first day can only be a full day or an afternoon off.errorsobject
companiesarray<object>
550e8400-e29b-41d4-a716-446655440020Sales Teamhttps://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/requests/absences
curl -X POST 'https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/requests/absences' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
--data '{"start_date":"2026-08-10"}'
const response = await fetch('https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/requests/absences', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
body: JSON.stringify({
"start_date": "2026-08-10"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post('https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/requests/absences',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'},
json={
"start_date": "2026-08-10"
}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
'http' => [
'method' => 'POST',
'header' => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
'content' => '{
\"start_date\": \"2026-08-10\"
}',
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/requests/absences', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057