Voxbi Cockpit APIs
All endpoints

Get the next availability date for an employee (user)

Searches forward from a start moment for the next time the employee is available and returns it. The response is a flat object and is not wrapped in a data envelope. When the employee is already available at that moment, next_available_date is null and available_now is true : there is no future availability to report, so a date equal to the current/from day is never returned for that case. The search is time-aware: a half day off only blocks the part of the day it covers. A morning absence (e.g. 08:00–12:00) that is under way returns today together with next_available_at = the moment it ends; an afternoon one reads as available before it starts and returns the next working day (date only) from the moment it does. message is a ready-to-display line for either case. When no available date is found within the search window (and the employee is not available now), the endpoint responds with 404 and a flat body reporting the searched range. A 404 is also returned when the employee cannot be found for the tenant.

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>
pbx_id path · string · uuid *
UUID of the PBX tenant.
employee_id path · string · uuid *
UUID of the employee whose next availability is requested.
from query · string
Moment the availability search starts from. Defaults to **now** when omitted. A bare date evaluates from that day's 00:00; pass a date-time (`YYYY-MM-DD HH:MM:SS`) to ask "is the employee available at this moment?" — half days are honoured to the clock.
max_days query · integer
Maximum number of days to search forward. Defaults to 90 when omitted.
accept header · string
example: application/json

Responses

The next available date for the employee. Flat object, not wrapped in data.
Response schema
successboolean
next_available_datestring · date
Date the employee is next available, or `null` when they are available at the moment checked (see `available_now`). Equal to the current/`from` day only when a half day off already under way ends later that same day.
nullable
next_available_atstring
Exact moment the employee is back (`YYYY-MM-DD HH:MM:SS`) when the data pins one down — the end of a morning half day off already under way. `null` when availability is only known at day granularity (whole days off, and afternoon half days where the working day is over).
nullable
messagestring
Ready-to-display line: "Back on <date>", or "Back on <date> at <time>" when a half day off brings the employee back the same day. `null` while available.
nullable
available_nowboolean
True when the employee is available at the moment checked.
currentobject
State of the `from` day, so a client can explain the situation.
datestring · date
availableboolean
reasonstring
`available`, `absence`, `public_holiday`, `special_holiday` or `non_working_day`.
absenceobject
The absence covering the moment checked; `null` when none does.
nullable
typestring
sub_typestring
nullable
statusstring
startstring · date
endstring · date
absence_windowobject
The intraday window a half day off covers on this day — reported even when the employee is available (before it starts / after it ends). `null` when the day is off as a whole or not off at all.
nullable
startstring
endstring
partstring
enum: am pm
employee_idstring · uuid
checked_fromstring · date
checked_from_atstring
The exact moment the search evaluated from.
checked_untilstring · date
Authorization Token Missing. This error is returned when the authorization token is missing.
Response schema
errorstring
Error message
example: Authorization Token is missing
No available date was found within the search window, or the employee could not be found for the tenant. The body is a flat object reporting the searched range.
Response schema
successboolean
messagestring
employee_idstring · uuid
checked_fromstring · date
checked_from_atstring
checked_untilstring · date
Unprocessable Parameters. This error is returned when a parameter is not valid.
Response schema
messagestring
example: The given data was invalid.
errorsobject
filterarray<string>
[]string
sortarray<string>
[]string
pagearray<string>
[]string
per_pagearray<string>
[]string
get https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/next-availability
Base URL
Request sample
curl -X GET 'https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/next-availability' \
  -H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/next-availability', {
  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}/user/{employee_id}/next-availability',
    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}/user/{employee_id}/next-availability', false, $context);
$data = json_decode($response, true);
print_r($data);
{}
"success": true,
"next_available_date": "2026-03-02",
"next_available_at": "2026-03-02 12:00:00",
"message": "Back on 2026-03-02 at 12:00",
"available_now": false,
"current": {},
"date": "2026-03-02",
"available": false,
"reason": "absence",
"absence": {},
"type": "legal",
"sub_type": null,
"status": "approved",
"start": "2026-03-02",
"end": "2026-03-02"
},
"absence_window": {}
"start": "2026-03-02 08:00:00",
"end": "2026-03-02 12:00:00",
"part": "am"
}
},
"employee_id": "550e8400-e29b-41d4-a716-446655440001",
"checked_from": "2026-03-02",
"checked_from_at": "2026-03-02 09:00:00",
"checked_until": "2026-05-30"
}
{}
"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
{}
"success": false,
"message": "No available date found within the search range.",
"employee_id": "550e8400-e29b-41d4-a716-446655440001",
"checked_from": "2026-03-01",
"checked_from_at": "2026-03-01 00:00:00",
"checked_until": "2026-05-30"
}
{}
"errors": {}
"filter": [],
"The filter field must be an array."
],
"sort": [],
"The sort field must be a string."
],
"page": [],
"The page field must be an integer."
],
"per_page": []
"The per page field must be an integer."
]
}
}
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