---
title: "delete script by hash (erase content but keep hash, require admin)"
method: POST
path: "/w/{workspace}/scripts/delete/h/{hash}"
tags: ["script"]
---

# delete script by hash (erase content but keep hash, require admin)

`POST /w/{workspace}/scripts/delete/h/{hash}`

## Path parameters

- `workspace` string, required
- `hash` string, required

## Response `200`

script details

- Script
  - `workspace_id` string
  - `hash` string, required
  - `path` string, required
  - `parent_hashes` string[] — The first element is the direct parent of the script, the second is the parent of the first, etc
  - `summary` string, required
  - `description` string, required
  - `content` string, required
  - `created_by` string, required
  - `created_at` string, date-time, required
  - `archived` boolean, required
  - `schema` object
  - `deleted` boolean, required
  - `is_template` boolean, required
  - `extra_perms` object, required
  - `lock` string
  - `lock_error_logs` string
  - `language` 'python3' | 'deno' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'bun' | 'php' | 'rust' | 'ansible' | 'csharp' | 'nu' | 'java' | 'ruby' | 'rlang' | 'duckdb' | 'bunnative' | 'dbt', required
  - `kind` 'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor', required
  - `starred` boolean, required
  - `tag` string
  - `draft_only` boolean
  - `envs` string[]
  - `concurrent_limit` integer
  - `concurrency_time_window_s` integer
  - `concurrency_key` string
  - `debounce_key` string
  - `debounce_delay_s` integer
  - `debounce_args_to_accumulate` string[]
  - `max_total_debouncing_time` integer
  - `max_total_debounces_amount` integer
  - `cache_ttl` number
  - `dedicated_worker` boolean
  - `ws_error_handler_muted` boolean
  - `priority` integer
  - `restart_unless_cancelled` boolean
  - `timeout` integer
  - `delete_after_secs` integer — If set, delete the job's args, result and logs after this many seconds following job completion
  - `visible_to_runner_only` boolean
  - `auto_kind` string
  - `codebase` string
  - `has_preprocessor` boolean, required
  - `on_behalf_of_email` string
  - `on_behalf_of` string — Authorization identity the runnable runs as: u/{username}, g/{group}, or a bare email when the username is itself email-shaped. The only stored half of the identity; on_behalf_of_email is derived from it.
  - `modules` object, nullable — Additional script modules keyed by relative file path
  - `labels` string[]
  - `inherited_labels` string[] — Labels inherited from the parent folder, computed at read time. Read-only — edit them on the folder.

---

[API](https://skmtc.net/windmill/apis/windmill-api.md) · [All operations](https://skmtc.net/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/windmill/windmill-api/versions/155a35b3caff/schema)
