> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notte.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# set_deletion_protection

> Turn deletion protection on or off

> [!TIP]
>
> Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.

While it is on, the function cannot be deleted.

```python theme={null}
function = notte.Function("<your-function-id>")
function.set_deletion_protection(True)
print(function.response.deletion_protected)
```

Any workspace member's key can turn it on. Turning it off takes the key of a
workspace admin or owner

## Parameters

**enabled** `bool` *required*

## Returns

`None`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.