Get Company Users
curl --request GET \
--url https://getbill.io/external-api/v1/company/users \
--header 'Authorization: <authorization>'import requests
url = "https://getbill.io/external-api/v1/company/users"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://getbill.io/external-api/v1/company/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://getbill.io/external-api/v1/company/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://getbill.io/external-api/v1/company/users"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://getbill.io/external-api/v1/company/users")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/company/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"error": false,
"message": "Success",
"data": [
{
"id": "abc123def456ghi789",
"email": "john.manager@company.com",
"firstname": "John",
"lastname": "Manager",
"is_active": true,
"created_at": "2023-01-15T10:30:00Z",
"last_activity": "2024-01-22T14:22:00Z"
},
{
"id": "xyz789mno012pqr345",
"email": "jane.agent@company.com",
"firstname": "Jane",
"lastname": "Agent",
"is_active": true,
"created_at": "2023-03-22T09:15:00Z",
"last_activity": "2024-01-22T11:45:00Z"
},
{
"id": "stu678vwx901yzab234",
"email": "bob.analyst@company.com",
"firstname": "Bob",
"lastname": "Analyst",
"is_active": false,
"created_at": "2023-06-10T16:20:00Z",
"last_activity": "2023-12-15T13:30:00Z"
}
]
}
Company API
Get Company Users
Retrieve a list of users in your company
GET
/
external-api
/
v1
/
company
/
users
Get Company Users
curl --request GET \
--url https://getbill.io/external-api/v1/company/users \
--header 'Authorization: <authorization>'import requests
url = "https://getbill.io/external-api/v1/company/users"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://getbill.io/external-api/v1/company/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://getbill.io/external-api/v1/company/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://getbill.io/external-api/v1/company/users"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://getbill.io/external-api/v1/company/users")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/company/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"error": false,
"message": "Success",
"data": [
{
"id": "abc123def456ghi789",
"email": "john.manager@company.com",
"firstname": "John",
"lastname": "Manager",
"is_active": true,
"created_at": "2023-01-15T10:30:00Z",
"last_activity": "2024-01-22T14:22:00Z"
},
{
"id": "xyz789mno012pqr345",
"email": "jane.agent@company.com",
"firstname": "Jane",
"lastname": "Agent",
"is_active": true,
"created_at": "2023-03-22T09:15:00Z",
"last_activity": "2024-01-22T11:45:00Z"
},
{
"id": "stu678vwx901yzab234",
"email": "bob.analyst@company.com",
"firstname": "Bob",
"lastname": "Analyst",
"is_active": false,
"created_at": "2023-06-10T16:20:00Z",
"last_activity": "2023-12-15T13:30:00Z"
}
]
}
Overview
This endpoint returns basic profile information and activity status for all users associated with your company account.Authentication
Requires a valid OAuth 2.0 access token with theusers:read scope.
Request
string
required
Bearer token for authentication
Example Request
curl -X GET "/external-api/v1/company/users" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
const response = await fetch('/external-api/v1/company/users', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
});
const users = await response.json();
Response
boolean
Always
false for successful requestsstring
Success message
array
Success Response
{
"error": false,
"message": "Success",
"data": [
{
"id": "abc123def456ghi789",
"email": "john.manager@company.com",
"firstname": "John",
"lastname": "Manager",
"is_active": true,
"created_at": "2023-01-15T10:30:00Z",
"last_activity": "2024-01-22T14:22:00Z"
},
{
"id": "xyz789mno012pqr345",
"email": "jane.agent@company.com",
"firstname": "Jane",
"lastname": "Agent",
"is_active": true,
"created_at": "2023-03-22T09:15:00Z",
"last_activity": "2024-01-22T11:45:00Z"
},
{
"id": "stu678vwx901yzab234",
"email": "bob.analyst@company.com",
"firstname": "Bob",
"lastname": "Analyst",
"is_active": false,
"created_at": "2023-06-10T16:20:00Z",
"last_activity": "2023-12-15T13:30:00Z"
}
]
}
Usage Notes
- Only basic user information is returned for security and privacy reasons
- Sensitive information like passwords, roles, and detailed permissions are not included
- Inactive users (is_active: false) are still returned but may have limited access
- The
last_activityfield helps identify active vs. inactive users - User management (creating, updating, deleting users) is not available through the external API
Error Responses
{
"error": true,
"message": "Authentication credentials are missing or invalid",
"code": 401
}
{
"error": true,
"message": "Required scope \"users:read\" not found in token",
"code": 403
}
{
"error": true,
"message": "Company not found",
"code": 404
}