List companies associated with an employee (user)
Returns a paginated list of the employee's contracts, each enriched with its company details. When no active filter is supplied, the currently active contract is flagged as the main company. Filtering and sorting are powered by Spatie Query Builder. The caller may only list their own companies: the request is rejected with 403 when the authenticated user has no access to the tenant or the employee record is not their own, and with 404 when the employee cannot be found.
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>
true false 1 0 application/jsonResponses
dataarray<object>
550e8400-e29b-41d4-a716-446655440000550e8400-e29b-41d4-a716-4466554400011001550e8400-e29b-41d4-a716-44665544000212024-01-01T00:00:00.000000Z2025-12-31T00:00:00.000000Z0 1136008.5Sales Representative550e8400-e29b-41d4-a716-446655440003company*object
550e8400-e29b-41d4-a716-446655440002550e8400-e29b-41d4-a716-446655440001Sales Team100 Market Street 10001 New YorkUS26144000linksobject
http://localhost/api/v1/resources?page=1http://localhost/api/v1/resources?page=1metaobject
111linksarray<object>
http://localhost/api/v1/resources?page=1first1http://localhost/api/v1/resources1511Authorization Token is missingmessagearray<string>
The given data was invalid.errorsobject
filterarray<string>
sortarray<string>
pagearray<string>
per_pagearray<string>
https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-companies
curl -X GET 'https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-companies' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-companies', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-companies',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
'http' => [
'method' => 'GET',
'header' => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-companies', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"message": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"errors": { … }
"filter": [ … ],
"sort": [ … ],
"page": [ … ],
"per_page": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057