v53

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-076771,7565.2 MB
Elastic Agent actions

Bulk unenroll agents

Spaces method and path for this operation:

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/fleet/agents/bulk_unenroll</span></div>

Refer to Spaces for more information.

Unenroll multiple agents, optionally revoking their enrollment API keys.<br/><br/>[Required authorization] Route required privileges: fleet-agents-all.

post/api/fleet/agents/bulk_unenroll

Headers

kbn-xsrfstring required
Example:true

A required header to protect against CSRF attacks

Request body

batchSizenumber
dryRunboolean
forceboolean

Unenrolls hosted agents too

includeInactiveboolean

When passing agents by KQL query, unenrolls inactive agents too

revokeboolean

Revokes API keys of agents

Response

Successful response

OR