Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
DELETE /v1/agents/{agent_id}
Permanently deletes the specified Agent. The operation is irreversible.
| Header | Required | Description |
|---|
Authorization | Yes | Bearer <PAT> |
Path parameters
| Parameter | Type | Required | Description |
|---|
agent_id | string | Yes | Agent unique identifier |
Request body
No request body.
Example request
curl -X DELETE "https://openapi.qoder.sh/api/v1/cloud/agents/agent_019eXXXX..." \
-H "Authorization: Bearer $QODER_PAT"
Example response
HTTP 200 OK
{
"type": "agent",
"id": "agent_019eXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"deleted": true
}
Response fields
| Field | Type | Description |
|---|
type | string | Always "agent" |
id | string | ID of the deleted Agent |
deleted | boolean | Always true on success |
Errors
| HTTP | Type | Trigger |
|---|
| 401 | authentication_error | PAT invalid or expired |
| 403 | permission_error | Not authorized to delete this Agent (admin role may be required) |
| 404 | not_found_error | Agent with the given ID does not exist or has already been deleted |
See Errors for the full error envelope.
Notes
- Deletion is permanent and not recoverable.
- To temporarily disable an Agent instead, use archival (
POST /v1/agents/{agent_id}/archive).
- Already-archived Agents may also be deleted.
- Calling
DELETE again on the same ID returns 404.
- Some deployments require an admin-level PAT (
x-gw-roles: admin); insufficient permissions return 403.
Before deleting
- Confirm no active sessions are running on the Agent.
- If unsure whether permanent deletion is needed, archive the Agent instead.
- Use the version history endpoint to back up the Agent configuration before deletion.