Set the authenticated user's in-call flag (user)
Reports whether the authenticated user is on a call right now: send true when the
call starts and false when it ends. The user is always taken from the bearer token,
so this endpoint can never change anyone else's flag.
The call is idempotent: sending the same value again simply refreshes the timestamp
and pushes the expiry window out. Sending false clears the flag immediately, and a
true that is never cleared expires by itself after ttl_seconds (one hour by
default), so it is safe to miss a hang-up report.
The new value is served by GET /poll (as in_call and in_call_updated_at) within
the poll's own short cache window of a few seconds.
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
1Responses
dataobject
550e8400-e29b-41d4-a716-44665544000012026-08-03T09:14:22+00:002026-08-03T10:14:22+00:003600Authorization Token is missingerrorsobject
in_callarray<string>
https://cockpit.voxbi.com/api/v1/in-call
curl -X POST 'https://cockpit.voxbi.com/api/v1/in-call' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
--data '{"in_call":true}'
const response = await fetch('https://cockpit.voxbi.com/api/v1/in-call', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
body: JSON.stringify({
"in_call": true
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post('https://cockpit.voxbi.com/api/v1/in-call',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'},
json={
"in_call": true
}
)
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' => '{
\"in_call\": true
}',
],
]);
$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