# Delete a secret

> Remove a secret. Shako stops putting its value in the requests of the VMs.

`DELETE /v1/tenants/{tenant}/secrets/{name}`

```bash curl
curl -X DELETE "https://api.shako.dev/v1/tenants/acme/secrets/GH_TOKEN" \
  -H "Authorization: Bearer $SHAKO_API_KEY"
```

```python Python
import os

import requests

response = requests.delete(
    "https://api.shako.dev/v1/tenants/acme/secrets/GH_TOKEN",
    headers={"Authorization": f"Bearer {os.environ['SHAKO_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
```

```javascript JavaScript
const response = await fetch("https://api.shako.dev/v1/tenants/acme/secrets/GH_TOKEN", {
  method: "DELETE",
  headers: { Authorization: `Bearer ${process.env.SHAKO_API_KEY}` },
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
```

```json 200
{
  "name": "GH_TOKEN",
  "deleted": true
}
```

Authenticate with `Authorization: Bearer <API key>` on `https://api.shako.dev`. Role: contributor or owner.

## Path parameters

**tenant** `string` *required*

The tenant's name, from GET /v1/tenants.

**name** `string` *required*

The secret's name.

## Response

200 with the names of the path and "deleted": true.

The errors: https://shako.dev/api/errors.md. All the endpoints of Secrets: https://shako.dev/api/secrets.md.
