v53

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

Delete an agent policy

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/agent_policies/delete</span></div>

Refer to Spaces for more information.

Delete an agent policy by ID.<br/><br/>[Required authorization] Route required privileges: fleet-agent-policies-all.

post/api/fleet/agent_policies/delete

Headers

kbn-xsrfstring required
Example:true

A required header to protect against CSRF attacks

Request body

agentPolicyIdstring required

The ID of the agent policy

forceboolean

bypass validation checks that can prevent agent policy deletion

Response

Successful response

idstring required
namestring required