---
title: "Delete a script"
method: DELETE
path: "/api/endpoint/scripts_library/{script_id}"
tags: ["Security Endpoint Management API"]
---

# Delete a script

`DELETE /api/endpoint/scripts_library/{script_id}`

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

<div><span class="operation-verb delete">delete</span>&nbsp;<span class="operation-path">/s/{space_id}/api/endpoint/scripts_library/{script_id}</span></div>

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

Delete a script

## Path parameters

- `script_id` string, required — The ID of the script entry to be deleted.

## Response `200`

Delete script response.

- object

## Changes

- **2026-07-21** `65f26ff12b38` — 1 warning
  - for the `path` request parameter `script_id`, the maxLength was set to `256`

[Change history](https://skmtc.dev/elastic/apis/kibana-apis/changes/api/endpoint/scripts_library/:script_id/delete.md)

---

[API](https://skmtc.dev/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.dev/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/elastic/kibana-apis/revisions/dfce7fdff4a2/schema)
