Permanently delete an agent. This operation is irreversible.
No request body is required.
HTTP 200 OK
See Errors for the full error envelope.
Request headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT> |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | Unique agent identifier. |
Request body
No request body is required.
Example request
Example response
HTTP 200 OK
Response fields
| Field | Type | Description |
|---|---|---|
type | string | Always "agent". |
id | string | Unique identifier of the deleted agent. |
deleted | boolean | Always true on success. |
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 401 | TOKEN_INVALID | The PAT is invalid, missing, or malformed. |
| 403 | permission_error | Caller lacks permission to delete this agent. An admin role may be required. |
| 404 | not_found_error | No agent exists with the given ID, or it has already been deleted. |
Notes
- Deletion is permanent and cannot be undone.
- To temporarily disable an agent instead, use Archive an agent.
- Deleting an already-archived agent is allowed.
- Calling
DELETEagain on the same ID returns 404. - Some deployments require additional admin permissions (the
x-gw-roles: adminheader); insufficient permissions return 403.
Before deleting
- Confirm that the agent has no active sessions running.
- If you are not sure whether permanent deletion is needed, archive the agent first.
- Back up the agent configuration through the version history endpoint before deleting.