List workforce members
curl --request GET \
--url https://api.trycomp.ai/v1/people \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/people', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/people"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "mem_abc123def456",
"organizationId": "org_abc123def456",
"userId": "usr_abc123def456",
"role": "admin",
"createdAt": "2024-01-01T00:00:00Z",
"department": "it",
"isActive": true,
"fleetDmLabelId": 123,
"user": {
"id": "usr_abc123def456",
"name": "John Doe",
"email": "john.doe@company.com",
"emailVerified": true,
"image": "https://example.com/avatar.jpg",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-15T00:00:00Z",
"lastLogin": "2024-01-15T12:00:00Z"
}
}
],
"count": 1,
"authType": "api-key",
"authenticatedUser": {
"id": "usr_abc123def456",
"email": "user@company.com"
}
}{
"message": "Invalid or expired API key"
}{
"message": "Organization with ID org_abc123def456 not found"
}{
"message": "Failed to retrieve members"
}People
List workforce members | Comp AI API
List employees and contractors with onboarding, training, device, and compliance status used for people-security controls.
GET
/
v1
/
people
List workforce members
curl --request GET \
--url https://api.trycomp.ai/v1/people \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/people', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/people"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "mem_abc123def456",
"organizationId": "org_abc123def456",
"userId": "usr_abc123def456",
"role": "admin",
"createdAt": "2024-01-01T00:00:00Z",
"department": "it",
"isActive": true,
"fleetDmLabelId": 123,
"user": {
"id": "usr_abc123def456",
"name": "John Doe",
"email": "john.doe@company.com",
"emailVerified": true,
"image": "https://example.com/avatar.jpg",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-15T00:00:00Z",
"lastLogin": "2024-01-15T12:00:00Z"
}
}
],
"count": 1,
"authType": "api-key",
"authenticatedUser": {
"id": "usr_abc123def456",
"email": "user@company.com"
}
}{
"message": "Invalid or expired API key"
}{
"message": "Organization with ID org_abc123def456 not found"
}{
"message": "Failed to retrieve members"
}Authorizations
API key for authentication
Query Parameters
Pass true to include deactivated members
ISO date — only members onboarded on or after it
ISO date — only members onboarded on or before it
ISO date — only members offboarded on or after it
ISO date — only members offboarded on or before it
Was this page helpful?

