Skip to content

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).

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>
queue path · string · uuid *
Identifier of the queue.
user path · string · uuid *
Identifier of the user whose status changes. The user must be a member of the queue.
accept header · string
example: application/json

Request body · required · application/json

Request schema
status_id*string · uuid
Status to set. Must belong to the caller's PBX.
sub_status_idsarray<string>
Sub statuses to set. Each must belong to the caller's PBX and be linked to `status_id`. Omit or send an empty list for none.
[]string · uuid

Responses

The status was changed.
Response schema
user_idstring · uuid
queue_idstring · uuid
status_idstring · uuid
sub_status_idsarray<string>
[]string · uuid
Bad Request. The member already got the same status too many times in a row; the shared status service blocks further identical changes.
Response schema
messagestring
errorsarray<string>
[]string
Authorization Token Missing. This error is returned when the authorization token is missing.
Response schema
errorstring
Error message
example: Authorization Token is missing
Forbidden. The caller lacks the queue manager role, or the target user is not a member of the queue, or the token is not a user token.
Response schema
messagestring
Not Found. The queue or the user does not exist in the caller's PBX. The same answer is given for another PBX's queue or user.
Response schema
messagestring
Conflict. Another status change for the same user is in progress; retry shortly.
Response schema
messagestring
errorsarray<string>
[]string
Unprocessable. `status_id` is missing, not in the caller's PBX, or a sub status is not in the caller's PBX or not linked to the status.
Response schema
messagestring
errorsobject
Free-form object
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/queues/{queue}/users/{user}/change-status
Base URL
Request sample
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);
Sample request
{ … }
"status_id": "550e8400-e29b-41d4-a716-446655440006",
"sub_status_ids": [ … ]
"550e8400-e29b-41d4-a716-446655440030"
]
}
{ … }
"user_id": "550e8400-e29b-41d4-a716-446655440020",
"queue_id": "550e8400-e29b-41d4-a716-446655440000",
"status_id": "550e8400-e29b-41d4-a716-446655440006",
"sub_status_ids": [ … ]
"550e8400-e29b-41d4-a716-446655440030"
]
}
Host string
example: cockpit.voxbi.com
Date string
example: Mon, 16 Oct 2023 14:08:48 GMT
Connection string
example: close
Cache-Control string
example: no-cache, private
Content-Type string
example: application/json
X-RateLimit-Limit integer
example: 60
X-RateLimit-Remaining integer
example: 59
Vary string
example: Origin
{ … }
"message": "Status change blocked.",
"errors": [ … ]
"Maximum successive same-status changes reached. Please contact support if this is unexpected."
]
}
Content-Type string
example: application/json
{ … }
"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": "Only queue managers can do this."
}
Content-Type string
example: application/json
{ … }
"message": "Queue not found."
}
Content-Type string
example: application/json
{ … }
"message": "Status change failed.",
"errors": [ … ]
"Another status change is already in progress. Please try again."
]
}
Content-Type string
example: application/json
{ … }
"message": "The status does not exist.",
"errors": { … }
"status_id": [ … ]
"The status does not exist."
]
}
}
Content-Type string
example: application/json
{ … }
"message": "Server Error"
}