Remove an agent from an organization
DELETE
/organizations/{org_id}/agents/{agent_id}
const url = 'https://api.perstat.io/organizations/example/agents/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
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.perstat.io/organizations/example/agents/example \ --header 'Authorization: Bearer <token>'Removes the agent from the organization and immediately invalidates its per-agent token, so it stops reporting and disappears from listings. Monitors bound to this agent are archived in the same transaction: they stop checking, release their slot in the plan limit, and any open incidents on them are resolved, so no further alerts are sent for a host that no longer exists. Archived monitors keep their history, availability figures, and exclusion windows, and can be restored (they come back paused). Uninstalling the agent software from the host is a separate step. Requires project management rights.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org_id
required
string
agent_id
required
string