---
title: "Delete a secret"
method: DELETE
path: "/secrets/{key}"
tags: ["Secrets"]
---

# Delete a secret

`DELETE /secrets/{key}`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/secrets/{key}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-2/docs/secrets/:key/delete.ts> (a function with typed inputs; its response is checked against the schema)

Removes a specific secret by its key from the secrets bucket

## Path parameters

- `key` string, required

## Query parameters

- `scope` 'user'

## Response `200`

Secret deleted successfully

- object
  - `message` string

## Other responses

- `400`: Bad request
- `404`: Secret not found

## Changes

- **2026-11-12** `4b1f083f4026`: 1 info
  - added the new optional `query` request parameter `scope`

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-2/changes/secrets/:key/delete.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-2.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-2/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-2/revisions/4b1f083f4026?raw)
