---
title: "Delete a secret"
method: DELETE
path: "/v1/projects/{projectId}/secrets/{secretName}"
tags: ["Secrets"]
---

# Delete a secret

`DELETE /v1/projects/{projectId}/secrets/{secretName}`

## Request

- Base URL: `https://api.spice.ai`
- URL: `https://api.spice.ai/v1/projects/{projectId}/secrets/{secretName}`
- Auth: HTTP bearer

Permanently deletes a secret by name.

## Path parameters

- `projectId` integer, required
- `secretName` string, required

## Headers

- `X-Org-Name` string

## Response `204`

Secret deleted successfully

## Other responses

- `400`: Invalid project ID
- `401`: Unauthorized
- `403`: Insufficient scope
- `404`: Project or secret not found
- `500`: Internal server error

---

[API](https://skmtc.dev/spice/apis/spice-cloud-control-plane-api.md) - [All operations](https://skmtc.dev/spice/apis/spice-cloud-control-plane-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spice/apis/spice-cloud-control-plane-api/revisions/5f3b75dd847d?raw)
