---
type: api
title: Delete a script
description: Delete a script
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-endpointscriptlibrarydeletescript
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-endpointscriptlibrarydeletescript
products:
  - Kibana
---

# Delete a script

- Server: `https://{kibana_url}`

## Paths

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

#### Path parameters

- `script_id` (string · max length: 256) — required
  The ID of the script entry to be deleted.
  Example: `fr518850-681a-4y60-aa98-e22640cae2b8`

## Description

Delete a script

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Response

Delete script response.

`application/json`

Type: `object`

## Code examples

#### Console

```console
DELETE kbn:/api/endpoint/scripts_library/fr518850-681a-4y60-aa98-e22640cae2b8
```

#### curl

```curl
curl -X DELETE "${KIBANA_URL}/api/endpoint/scripts_library/fr518850-681a-4y60-aa98-e22640cae2b8" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### Delete script response example.

```json
{}
```

