Read the authenticated user's in-call flag (user)
Returns whether the authenticated user is currently reported as being on a call,
plus when that was last reported. The flag is owned by Cockpit: it is whatever the
client last sent to POST /in-call.
A flag set to true is trusted for a limited window only (ttl_seconds, one hour by
default). Past that window it decays back to false on its own, so a client that
never gets to report the hang-up (crash, network loss, killed app) cannot leave the
user marked in-call forever. in_call_updated_at and expires_at are null when
nothing has been reported inside the window.
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
dataobject
550e8400-e29b-41d4-a716-44665544000012026-08-03T09:14:22+00:002026-08-03T10:14:22+00:003600Authorization Token is missinghttps://cockpit.voxbi.com/api/v1/in-call
curl -X GET 'https://cockpit.voxbi.com/api/v1/in-call' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/in-call', {
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/in-call',
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/in-call', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
"data": { … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057