# DELETE /automations/:automation_id/actions/:action_id/custom-script/secrets/:secret_name

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

Remove a third-party secret from a Custom Script.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `automation_id` | path | string | yes |  |
| `action_id` | path | string | yes |  |
| `secret_name` | 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/automations/:automation_id/actions/:action_id/custom-script/secrets/:secret_name"   -H "Authorization: Bearer YOUR_API_KEY"
```

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