Toggle DND on every extension of a user
/users/{user}/dnds/all
Creates a new dnd user dnds all. Validation rules and required fields are defined in the
request body schema below.
Same PBX only: a {user} of another PBX answers 404. Writes are allowed for the user themself
or a caller with the write users permission, otherwise 403.
Sets the internal DND and the external DND for every caller identity the {user} may use for
call rules: their own, their groups', their SIP devices' and the PBX ones (whatever the
"PBX outgoing numbers" setting), ordered by number.
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 · application/json
1Responses
dataobject
5Authorization Token is missinghttps://cockpit.voxbi.com/api/v1/users/{user}/dnds/all
curl -X POST 'https://cockpit.voxbi.com/api/v1/users/{user}/dnds/all' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
--data '{"status":true}'
const response = await fetch('https://cockpit.voxbi.com/api/v1/users/{user}/dnds/all', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
body: JSON.stringify({
"status": true
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post('https://cockpit.voxbi.com/api/v1/users/{user}/dnds/all',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'},
json={
"status": 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' => '{
\"status\": true
}',
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/users/{user}/dnds/all', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
{ … }
"data": { … }
cockpit.voxbi.comMon, 16 Oct 2023 14:08:48 GMTcloseno-cache, privateapplication/json6059Origin{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
{ … }
{ … }
30