Change presence status for the authenticated user (user)
Record a presence status change for the authenticated user. This opens a new timepoint for the selected status and, when the status is mapped to the external Tempus system, propagates the change and returns the updated work-time totals.
status_id accepts either a Cockpit status UUID or an external Tempus mapping
identifier, which is resolved to the matching Cockpit status server-side. The
user and PBX are always derived from the authenticated token and must not be
sent in the request body.
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
550e8400-e29b-41d4-a716-446655440000550e8400-e29b-41d4-a716-446655440010sub_status_idsarray<string>
sourcesarray<string>
triggersarray<string>
{"lat":49.6116,"lng":6.1319}{"gpsLat":49.6116,"gpsLong":6.1319,"accuracy":12.5,"gpsTimestamp":1783418859289}Starting morning shiftResponses
uiobject
workTimesobject
uiobject
dataobject
550e8400-e29b-41d4-a716-446655440000550e8400-e29b-41d4-a716-446655440001550e8400-e29b-41d4-a716-446655440002550e8400-e29b-41d4-a716-446655440003550e8400-e29b-41d4-a716-446655440010locationobject | null
550e8400-e29b-41d4-a716-446655440010HQ Luxembourg12Rue de BonnevoieLuxembourg1260550e8400-e29b-41d4-a716-44665544001149.60086.13315012024-03-01T08:29:07Z2024-03-01T12:00:00Z{"channel":"cockpit","device_id":"550e8400-e29b-41d4-a716-446655440010"}{"type":"manual_change","actor_id":"550e8400-e29b-41d4-a716-446655440002"}{"note":"Started shift remotely","gpsLat":49.95,"gpsLong":6.133}device_gpsobject | null
49.956.13312.52026-07-07T10:07:39+00:001783418859289location_checkobject | null
550e8400-e29b-41d4-a716-44665544001049.60086.13315038957match mismatch unknownmismatchno_device_gps no_location location_without_coordinates no_geofence_radius null2024-03-01T08:29:07Z2024-03-01T08:29:07ZworkTimesobject
Authorization Token is missingmessagearray<string>
errorsarray<string>
The given data was invalid.errorsobject
filterarray<string>
sortarray<string>
pagearray<string>
per_pagearray<string>
https://cockpit.voxbi.com/api/v1/change-status
curl -X POST 'https://cockpit.voxbi.com/api/v1/change-status' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
--data '{"status_id":"550e8400-e29b-41d4-a716-446655440000","location_id":"550e8400-e29b-41d4-a716-446655440010","sub_status_ids":["550e8400-e29b-41d4-a716-446655440020"],"sources":["mobile"],"triggers":["manual"],"meta_data":{"app_version":"3.4.1"},"gpsData":{"gpsLat":49.6116,"gpsLong":6.1319,"accuracy":12.5,"gpsTimestamp":1783418859289},"comment":"Starting morning shift"}'
const response = await fetch('https://cockpit.voxbi.com/api/v1/change-status', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
body: JSON.stringify({
"status_id": "550e8400-e29b-41d4-a716-446655440000",
"location_id": "550e8400-e29b-41d4-a716-446655440010",
"sub_status_ids": [
"550e8400-e29b-41d4-a716-446655440020"
],
"sources": [
"mobile"
],
"triggers": [
"manual"
],
"meta_data": {
"app_version": "3.4.1"
},
"gpsData": {
"gpsLat": 49.6116,
"gpsLong": 6.1319,
"accuracy": 12.5,
"gpsTimestamp": 1783418859289
},
"comment": "Starting morning shift"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post('https://cockpit.voxbi.com/api/v1/change-status',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'},
json={
"status_id": "550e8400-e29b-41d4-a716-446655440000",
"location_id": "550e8400-e29b-41d4-a716-446655440010",
"sub_status_ids": [
"550e8400-e29b-41d4-a716-446655440020"
],
"sources": [
"mobile"
],
"triggers": [
"manual"
],
"meta_data": {
"app_version": "3.4.1"
},
"gpsData": {
"gpsLat": 49.6116,
"gpsLong": 6.1319,
"accuracy": 12.5,
"gpsTimestamp": 1783418859289
},
"comment": "Starting morning shift"
}
)
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' => '{
\"status_id\": \"550e8400-e29b-41d4-a716-446655440000\",
\"location_id\": \"550e8400-e29b-41d4-a716-446655440010\",
\"sub_status_ids\": [
\"550e8400-e29b-41d4-a716-446655440020\"
],
\"sources\": [
\"mobile\"
],
\"triggers\": [
\"manual\"
],
\"meta_data\": {
\"app_version\": \"3.4.1\"
},
\"gpsData\": {
\"gpsLat\": 49.6116,
\"gpsLong\": 6.1319,
\"accuracy\": 12.5,
\"gpsTimestamp\": 1783418859289
},
\"comment\": \"Starting morning shift\"
}',
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/change-status', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
"sub_status_ids": [ … ],
"sources": [ … ],
"triggers": [ … ],
"meta_data": { … },
"gpsData": { … },
{ … }
"ui": { … },
"workTimes": { … },
{ … }
"ui": { … },
"data": { … }
"sources": [ … ],
"triggers": [ … ],
"meta_data": { … },
"device_gps": { … },
"location_check": { … }
"location": { … },
"device_gps": { … },
"location_check": { … },
"workTimes": { … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"message": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"errors": [ … ],
{ … }
"errors": { … }
"filter": [ … ],
"sort": [ … ],
"page": [ … ],
"per_page": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057