Remove host (device) from Fleet
DELETE
/v1/people/{id}/host/{hostId}
const url = 'https://api.varman.io/v1/people/mem_abc123def456/host/1';const options = {method: 'DELETE', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.varman.io/v1/people/mem_abc123def456/host/1 \ --header 'X-API-Key: <X-API-Key>'Removes a single host (device) from FleetDM by host ID. Only organization owners can perform this action. Validates that the organization exists and the member exists within the organization.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Example
mem_abc123def456Member ID
hostId
required
number
Example
1FleetDM host ID
Responses
Section titled “Responses”Host removed from Fleet successfully
Media typeapplication/json
object
success
Indicates successful removal
boolean
authType
How the request was authenticated
string
Example
{ "success": true, "authType": "api-key"}Unauthorized - Invalid authentication, insufficient permissions, or not organization owner
Media typeapplication/json
object
message
string
Example
{ "message": "Unauthorized"}Organization or member not found
Media typeapplication/json
object
message
string
Example
{ "message": "Member with ID mem_abc123def456 not found in organization org_abc123def456"}Internal server error
Media typeapplication/json
object
message
string
Example
{ "message": "Failed to remove host"}