# DELETE /custom-scripts/:script_id/tp-key

**Resource:** [Custom Scripts](./custom-scripts.md)  
**MCP tool:** `detach_custom_script_tp_key`  
**Scopes:** `custom-scripts:write`  
**Write operation:** yes

Remove the TrustPager API key from a Custom Script - tp.* becomes unavailable to it on the next deploy.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `script_id` | path | string | yes |  |
| `require_approval` | query | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X DELETE   "https://api.trustpager.com/functions/v1/api/v1/custom-scripts/:script_id/tp-key"   -H "Authorization: Bearer YOUR_API_KEY"
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`