---
title: Delete a script
description: To delete an individual script in a realm, perform an HTTP DELETE using the /json{/realm}/scripts endpoint, specifying the UUID in the URL.
component: pingam
version: 8.1
page_id: pingam:am-scripting:rest-api-scripts-delete
canonical_url: https://docs.pingidentity.com/pingam/8.1/am-scripting/rest-api-scripts-delete.html
keywords: ["Scripts", "JSON"]
page_aliases: ["scripting-guide:rest-api-scripts-delete.adoc"]
---

# Delete a script

To delete an individual script in a realm, perform an HTTP DELETE using the `/json{/realm}/scripts` endpoint, specifying the UUID in the URL.

|   |                                                                        |
| - | ---------------------------------------------------------------------- |
|   | If the realm is not specified in the URL, AM uses the top level realm. |

The `iPlanetDirectoryPro` header is required and should contain the SSO token of an administrative user, such as `amAdmin`, who has access to perform the operation.

```bash
$ curl \
--request DELETE \
--header "iPlanetDirectoryPro: AQIC5…​" \
--header "Accept-API-Version: resource=1.1" \
https://am.example.com:8443/am/json/realms/root/realms/myrealm/scripts/0168d494-015a-420f-ae5a-6a2a5c1126af
{}
```
