---
title: "Delete an agent"
method: DELETE
path: "/v1/agent/{agentId}"
tags: ["Agent"]
---

# Delete an agent

`DELETE /v1/agent/{agentId}`

Soft-deletes an agent by its ID. The agent is hidden from all reads and stops being attributed to new calls, but its record and history are retained. Fails with 409 if the agent is still referenced by simulation run plans: cancel those run plans first. Note: if the agent syncs from a provider integration, also exclude it in the integration settings (or delete the integration) so its calls stop reaching Roark.

## Path parameters

- `agentId` string, required

## Response `200`

The agent was deleted

- object
  - `data` object, required
    - `id` string, uuid, required — Unique identifier of the deleted agent
    - `deleted` true, required — Always true when the agent was successfully deleted

## Other responses

- `401` — Unauthorized
- `404` — Not Found
- `409` — Conflict
- `500` — Internal Server Error

## Changes

- **2026-08-17** `887b091b3d81` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/roarkhq/apis/roark-analytics-api/changes/v1/agent/:agentId/delete.md)

---

[API](https://skmtc.dev/roarkhq/apis/roark-analytics-api.md) · [All operations](https://skmtc.dev/roarkhq/apis/roark-analytics-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/roarkhq/roark-analytics-api/revisions/1d61b68e9429/schema)
