Skip to main content

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.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>

Path parameters

ParameterTypeRequiredDescription
agent_idstringYesAgent 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

FieldTypeDescription
typestringAlways "agent"
idstringID of the deleted Agent
deletedbooleanAlways true on success

Errors

HTTPTypeTrigger
401authentication_errorPAT invalid or expired
403permission_errorNot authorized to delete this Agent (admin role may be required)
404not_found_errorAgent 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

  1. Confirm no active sessions are running on the Agent.
  2. If unsure whether permanent deletion is needed, archive the Agent instead.
  3. Use the version history endpoint to back up the Agent configuration before deletion.