Voxbi Cockpit APIs
All endpoints

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.

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>
accept header · string
example: application/json

Responses

Response schema
dataobject
A user's live "on a call right now" flag, owned by Cockpit and reported by the client itself (`POST /in-call`). The flag is deliberately short-lived: a `true` is trusted for `ttl_seconds` only (one hour by default) and then decays back to `false`, so a client that never reports the hang-up cannot leave the user marked in-call indefinitely. Reading a user who has reported nothing inside that window is not an error: it presents as `in_call: false` with null timestamps.
user_id*string · uuid
The user the flag belongs to (always the bearer token's own user).
example: 550e8400-e29b-41d4-a716-446655440000
in_call*boolean
Whether the user is currently reported as being on a call.
example: 1
in_call_updated_at*string | null · date-time
When the flag was last reported, or null if nothing was reported inside the window.
example: 2026-08-03T09:14:22+00:00
expires_at*string | null · date-time
When the current value stops being trusted and reverts to false, or null when there is no live value. Refreshed on every report.
example: 2026-08-03T10:14:22+00:00
ttl_seconds*integer
How long (seconds) a reported flag is trusted before it decays to false.
example: 3600
Authorization Token Missing. This error is returned when the authorization token is missing.
Response schema
errorstring
Error message
example: Authorization Token is missing
Server error. An unexpected condition was encountered on the server and the request could not be completed. The body is a generic JSON envelope with a `message` field. The response is logged on the server side; quote the request URL + timestamp when reporting an issue.
Response schema
messagestring
exceptionstring
Only present in non-production environments.
filestring
Only present in non-production environments.
lineinteger
Only present in non-production environments.
get https://cockpit.voxbi.com/api/v1/in-call
Base URL
Request sample
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": {}
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"in_call": true,
"in_call_updated_at": "2026-08-03T09:14:22+00:00",
"expires_at": "2026-08-03T10:14:22+00:00",
"ttl_seconds": 3600
}
}
{}
"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
{}
"message": "Server Error"
}