Skip to main content
DELETE
/
v1
/
agents
/
{agent_id}
curl -X DELETE https://api.dari.dev/v1/agents/agt_123 \
  -H "Authorization: Bearer $DARI_API_KEY"
{
  "id": "agt_123",
  "name": "support-agent",
  "active_version_id": "ver_9",
  "created_at": "2026-04-20T12:34:56Z",
  "deleted_at": "2026-04-20T13:00:00Z"
}
Soft-deletes an agent by stamping deleted_at on the record. The agent and its versions remain in the database so existing sessions and message history are preserved, but the agent is hidden from List Agents and new work against it is rejected. The call is idempotent — calling it again on an already-deleted agent returns the same deleted_at timestamp set by the first call. After deletion, subsequent calls to Publish Version and Create Session for this agent_id return 404 Not Found.

Path Parameters

agent_id
string
required
Agent ID.

Headers

Authorization
string
required
Bearer token using your Dari API key.

Response Fields

id
string
Agent ID.
name
string
Human-readable agent name.
active_version_id
string | null
Agent version that was active at deletion time, or null if none was active.
created_at
string
ISO-8601 timestamp when the agent was created.
deleted_at
string
ISO-8601 timestamp when the agent was soft-deleted.
curl -X DELETE https://api.dari.dev/v1/agents/agt_123 \
  -H "Authorization: Bearer $DARI_API_KEY"
{
  "id": "agt_123",
  "name": "support-agent",
  "active_version_id": "ver_9",
  "created_at": "2026-04-20T12:34:56Z",
  "deleted_at": "2026-04-20T13:00:00Z"
}