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

# Delete a secret

> Delete a secret. Later runs of apps that reference it fail because a required env entry is missing.

**`DELETE`** `https://api-datahub.octoparse.com/v1/secrets/{name}`

Authentication: API key required (`Authorization: Bearer <API Key>`).

Deletes a stored secret. Apps that still reference `env.<name>` fail on later runs until you restore the secret or update the app.

## Request

### Path parameters

<ParamField path="name" type="string" required>
  Secret name.
</ParamField>

### Example request

```bash theme={null}
curl -X DELETE   -H "Authorization: Bearer $OCTOPARSE_API_KEY"   "https://api-datahub.octoparse.com/v1/secrets/EXAMPLE_API_KEY"
```

## Response

### 200 success

```json theme={null}
{
  "data": {
    "name": "EXAMPLE_API_KEY",
    "deleted": true
  }
}
```

### Errors

| HTTP | `code`             | `category`  | Description                 |
| ---- | ------------------ | ----------- | --------------------------- |
| 401  | `unauthorized`     | `forbidden` | Missing or invalid API key. |
| 404  | `secret-not-found` | `not_found` | Secret does not exist.      |

Error responses use `{"error": {code, category, message, retryable}}`. See <a href="/docs/en/datahub/api/reference/introduction#errors">Errors</a>.

## Client libraries

The Python and JavaScript SDKs do not wrap this endpoint yet. Call REST directly.
