# Delete a secret. A session that names it afterwards fails instead of starting without it.

`DELETE /o/{org}/secrets/{secret}`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org` | path | string | yes | The org's slug or id. A caller with no role in the org gets `404`. |
| `secret` | path | string | yes |  |

## Example request

```bash
curl -X DELETE "https://api.prix.dev/o/$RUSH_ORG/secrets/$SECRET" \
  -H "Authorization: Bearer $RUSH_TOKEN"
```

```typescript
const org = process.env.RUSH_ORG;
const secret = process.env.SECRET;

const res = await fetch(`https://api.prix.dev/o/${org}/secrets/${secret}`, {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.RUSH_TOKEN}`,
  },
});

console.log(res.status, await res.text());
```

```python
import os

import requests

org = os.environ["RUSH_ORG"]
secret = os.environ["SECRET"]

res = requests.delete(
    f"https://api.prix.dev/o/{org}/secrets/{secret}",
    headers={"Authorization": f"Bearer {os.environ['RUSH_TOKEN']}"},
)

print(res.status_code, res.text)
```

## Responses

### 204

Deleted.

### 403

Not its creator or an org admin.

### 404

`SECRET_NOT_FOUND`.

## Example response (204)

```http
HTTP 204 Deleted.
```
