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"
}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.
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
"mem_abc123def456"
Response
Member updated successfully
Member ID
"mem_abc123def456"
Organization ID this member belongs to
"org_abc123def456"
User ID associated with member
"usr_abc123def456"
Member role
"admin"
When the member was created
"2024-01-01T00:00:00Z"
Member department. May be one of the built-in values (none, admin, gov, hr, it, itsm, qms) or a custom department name.
"it"
Job title for the member
"Software Engineer"
Whether member is active
true
Whether member is deactivated
false
FleetDM label ID for member devices
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?

