Unlink device from member
curl --request PATCH \
--url https://api.trycomp.ai/v1/people/{id}/unlink-device \
--header 'X-API-Key: <api-key>'const options = {method: 'PATCH', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/people/{id}/unlink-device', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/people/{id}/unlink-device"
headers = {"X-API-Key": "<api-key>"}
response = requests.patch(url, headers=headers)
print(response.text){
"id": "mem_abc123def456",
"organizationId": "org_abc123def456",
"userId": "usr_abc123def456",
"role": "member",
"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"
}
}{
"message": "User user@example.com is already a member of this organization"
}{
"message": "Unauthorized"
}{
"message": "Member with ID mem_abc123def456 not found in organization org_abc123def456"
}{
"message": "Internal server error"
}People
Unlink device from member | Comp AI API
Resets the fleetDmLabelId for a member, effectively unlinking their device from FleetDM. This will disconnect the device from the organization.
PATCH
/
v1
/
people
/
{id}
/
unlink-device
Unlink device from member
curl --request PATCH \
--url https://api.trycomp.ai/v1/people/{id}/unlink-device \
--header 'X-API-Key: <api-key>'const options = {method: 'PATCH', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/people/{id}/unlink-device', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/people/{id}/unlink-device"
headers = {"X-API-Key": "<api-key>"}
response = requests.patch(url, headers=headers)
print(response.text){
"id": "mem_abc123def456",
"organizationId": "org_abc123def456",
"userId": "usr_abc123def456",
"role": "member",
"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"
}
}{
"message": "User user@example.com is already a member of this organization"
}{
"message": "Unauthorized"
}{
"message": "Member with ID mem_abc123def456 not found in organization org_abc123def456"
}{
"message": "Internal server error"
}Authorizations
API key for authentication
Path Parameters
Member ID
Example:
"mem_abc123def456"
Response
Member updated successfully
Member ID
Example:
"mem_abc123def456"
Organization ID this member belongs to
Example:
"org_abc123def456"
User ID associated with member
Example:
"usr_abc123def456"
Member role
Example:
"admin"
When the member was created
Example:
"2024-01-01T00:00:00Z"
Member department
Available options:
none, admin, gov, hr, it, itsm, qms Example:
"it"
Job title for the member
Example:
"Software Engineer"
Whether member is active
Example:
true
Whether member is deactivated
Example:
false
FleetDM label ID for member devices
Example:
123
User information
Show child attributes
Show child attributes
Background check requests for this member
Show child attributes
Show child attributes
Was this page helpful?

