# Unset function secret

> Remove a secret from a function. Doesn't take effect on the running function until the next deploy.

`DELETE https://api.zavu.dev/v1/functions/{functionId}/secrets/{key}`

Remove a secret from a function. Doesn't take effect on the running function until the next deploy.

## Parameters

- `functionId` (path, string, required): Zavu Function ID.
- `key` (path, string, required)

## Responses

### 204

Secret removed.

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 404

Secret not found.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X DELETE "https://api.zavu.dev/v1/functions/function_abc123/secrets/key_abc123" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

await zavu.functions.secrets.unset("key_abc123", {
  functionId: "function_abc123",
});
```
