---
title: "POST /scripts/delete"
method: POST
path: "/scripts/delete"
tags: ["scripts"]
---

# POST /scripts/delete

`POST /scripts/delete`

Deletes a script by id.

## Headers

- `X-Phantombuster-Org` string

## Request body

- object
  - `id` string, required — Id of the script to delete.
  - `branch` string, nullable — Branch of the script to delete.
  - `environment` 'staging' | 'release' — Environment of the script to delete.

## Response `200`

Script deleted successfully.

## Other responses

- `400` — Branch doesn't exist or script not found.
- `412` — Script does not exist in the specified branch.

---

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