> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: deleteSecret(id: string) # Method package: wixSecretsBackend # Method menu location: wixSecretsBackend --> deleteSecret # Method Link: https://dev.wix.com/docs/velo/apis/wix-secrets-backend/delete-secret.md # Method Description: > **Deprecation Warning** > > This method will be deprecated on September 7, 2025. > > Replace with [Delete Secret](https://dev.wix.com/docs/velo/apis/wix-secrets-backend-v2/secrets/delete-secret.md). Deletes an existing secret by ID. The `deleteSecret()` function returns a Promise that resolves when a secret from the Secrets Manager is deleted. You can retrieve the `id` parameter using the [`listSecretInfo()`](#listSecretInfo) function. Note that the ID used here is the ID retrieved from [`listSecretInfo()`](#listSecretInfo), not the secret name used by [`getSecret()`](#getSecret). > **Note:** Deleting a secret is irreversible and will break all code using the secret. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Delete an existing secret ```javascript import { Permissions, webMethod } from 'wix-web-module'; import wixSecretsBackend from 'wix-secrets-backend'; export const deleteMySecret = webMethod(Permissions.Anyone, () => { const id = "b741766c-eead-46fe-8e7f-fd01ff3d6e21"; return wixSecretsBackend.deleteSecret(id) .then(() => { console.log("Secret deleted"); }) .catch((error) => { console.error(error); }); }); ``` ## Retrieve an ID and delete a secret ```javascript import { Permissions, webMethod } from 'wix-web-module'; import wixSecretsBackend from 'wix-secrets-backend'; export const deleteFirstSecret = webMethod(Permissions.Anyone, () => { return wixSecretsBackend.listSecretInfo() .then((secrets) => { return wixSecretsBackend.deleteSecret(secrets[0].id); }) .then(() => { console.log("Secret deleted"); }) .catch((error) => { console.error(error); }); }); ``` ---