---
title: "Delete a v2 agent"
method: DELETE
path: "/api/v1/organizations/{organization_id}/agents/{id}"
tags: ["organizations"]
---

# Delete a v2 agent

`DELETE /api/v1/organizations/{organization_id}/agents/{id}`

## Request

- Base URL: `https://composal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://composal.com/api/v1/organizations/{organization_id}/agents/{id}`
- Auth: HTTP bearer

Owners and managers may delete non-project v2 agents. Echo sharing_version as expected_version. Removes product access and execution authority immediately, then asynchronously stops runs and automations. Internal records are retained for audit. Repeated deletion returns 404.

## Path parameters

- `organization_id` string, required
- `id` string, required

## Request body

- object
  - `expected_version` integer, required

## Response `200`

Success

- object

## Other responses

- `204`: Agent removed; runtime revocation queued
- `401`: Authentication required
- `403`: Current private-agent management authority required
- `404`: Organization or authorized agent not found
- `409`: Version or idempotency conflict; reload before starting a new operation
- `422`: Invalid configuration or operation
- `502`: Bad gateway

---

[API](https://skmtc.dev/composal/apis/vex-api.md) - [All operations](https://skmtc.dev/composal/apis/vex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/composal/apis/vex-api/revisions/74298a24e040?raw)
