---
title: "Delete an agent"
method: DELETE
path: "/api/v4/projects/{id}/cluster_agents/{agent_id}"
tags: ["cluster_agents"]
---

# Delete an agent

`DELETE /api/v4/projects/{id}/cluster_agents/{agent_id}`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/cluster_agents/{agent_id}`
- Auth: none declared

Deletes an existing agent registration. You must have the Maintainer or Owner role to use this endpoint.

## Path parameters

- `id` string, required
- `agent_id` integer, required

## Response `204`

Resource deleted

---

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