---
title: "Delete agent configuration"
method: DELETE
path: "/api/apm/settings/agent-configuration"
tags: ["APM agent configuration"]
---

# Delete agent configuration

`DELETE /api/apm/settings/agent-configuration`

**Spaces method and path for this operation:**

<div><span class="operation-verb delete">delete</span>&nbsp;<span class="operation-path">/s/{space_id}/api/apm/settings/agent-configuration</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Delete an existing agent configuration. You must have `all` privileges for the APM and User Experience feature in Kibana. When successful, the configuration is removed and, if Fleet is enabled, APM package policies are synchronized accordingly.

## Headers

- `elastic-api-version` '2023-10-31', required
- `kbn-xsrf` string, required

## Request body

- APMUIDeleteServiceObject — Service
  - `service` APMUIServiceObject, required — Service
    - `environment` string — The environment of the service.
    - `name` string — The name of the service.

## Response `200`

Successful response

- APMUIDeleteAgentConfigurationsResponse
  - `result` string — Result

## Other responses

- `400` — Bad Request response
- `401` — Unauthorized response
- `403` — Forbidden response
- `404` — Not found response

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
