Voxbi Cockpit APIs
All endpoints

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.

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

Request body · required

Request schema
in_call*boolean
true while the user is on a call, false once it has ended.
example: 1

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
Unprocessable Content. `in_call` is missing or is not a boolean.
Response schema
messagestring
errorsobject
in_callarray<string>
[]string
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.
post https://cockpit.voxbi.com/api/v1/in-call
Base URL
Request sample
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);
Sample request
{}
"in_call": true
}
{}
"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": "The in call field is required.",
"errors": {}
"in_call": []
"The in call field is required."
]
}
}
{}
"message": "Server Error"
}