Change the status of a queue member (user)
Lets a queue manager set the status, and optionally the sub statuses, of a
member of one of the PBX's queues. The change is recorded like any other
status change, as made by the manager. The server writes a fixed comment,
"Status changed by <manager> for queue <queue>."; the request has no
comment field.
Auth. A user bearer token only. A customer API key responds 403.
Roles. The caller must hold the queue manager role (GET /me:
is_queue_manager). The role is PBX-wide: a manager may change members of
any queue of the PBX.
Tenancy. The queue, the user, the status and the sub statuses must all belong to the caller's own PBX. A queue or user of another PBX responds 404, exactly like one that does not exist.
Error order. 403 (no queue manager role), then 404 (queue or user missing or in another PBX), then 403 (user is not a member of the queue), then 422 (invalid body), then errors of the status change itself (for example 409 when another change for the same user is in progress).
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 · application/json
sub_status_idsarray<string>
Responses
sub_status_idsarray<string>
errorsarray<string>
Authorization Token is missingerrorsarray<string>
errorsobject
https://cockpit.voxbi.com/api/v1/queues/{queue}/users/{user}/change-status
curl -X POST 'https://cockpit.voxbi.com/api/v1/queues/{queue}/users/{user}/change-status' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
--data '{"status_id":"550e8400-e29b-41d4-a716-446655440006","sub_status_ids":["550e8400-e29b-41d4-a716-446655440030"]}'
const response = await fetch('https://cockpit.voxbi.com/api/v1/queues/{queue}/users/{user}/change-status', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
body: JSON.stringify({
"status_id": "550e8400-e29b-41d4-a716-446655440006",
"sub_status_ids": [
"550e8400-e29b-41d4-a716-446655440030"
]
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post('https://cockpit.voxbi.com/api/v1/queues/{queue}/users/{user}/change-status',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'},
json={
"status_id": "550e8400-e29b-41d4-a716-446655440006",
"sub_status_ids": [
"550e8400-e29b-41d4-a716-446655440030"
]
}
)
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-446655440006\",
\"sub_status_ids\": [
\"550e8400-e29b-41d4-a716-446655440030\"
]
}',
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/queues/{queue}/users/{user}/change-status', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
"sub_status_ids": [ … ]
{ … }
"sub_status_ids": [ … ]
cockpit.voxbi.comMon, 16 Oct 2023 14:08:48 GMTcloseno-cache, privateapplication/json6059Origin{ … }
"errors": [ … ]
application/json{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
application/json{ … }
application/json{ … }
"errors": [ … ]
application/json{ … }
"errors": { … }
"status_id": [ … ]
application/json