---
title: "DELETE Delete a secret"
description: "Delete a secret"
last_updated: "2026-05-06T07:33:58.292098+00:00"
canonical_url: "https://www.doc0.dev/docs/49c89830-117b-4def-8edc-b5bcc50766e0/api/secrets/deletesecret"
---

<APIEndpoint
  method={"DELETE"}
  path={"/api/secrets/:id"}
  summary={"Delete a secret"}
  description={"Delete a secret"}
  deprecated={false}
  baseUrl={""}
/>

## Parameters

<APIParameters parameters={[{"name":"id","in":"path","required":true,"description":"ID of the secret to delete","schema":{"type":"string"}},{"name":"organizationId","in":"query","required":true,"description":"Organization ID","schema":{"type":"string"}}]} />

## Responses

<APIResponse
  statusCode={"200"}
  description={"Secret deleted successfully"}
  contentType={"application/json"}
  schema={{"type":"object"}}
/>

<APIResponse
  statusCode={"400"}
  description={"Organization ID is required"}
  contentType={"application/json"}
  schema={{"type":"object"}}
/>

<APIResponse
  statusCode={"401"}
  description={"Unauthorized"}
  contentType={"application/json"}
  schema={{"type":"object"}}
/>

<APIResponse
  statusCode={"403"}
  description={"Forbidden"}
  contentType={"application/json"}
  schema={{"type":"object"}}
/>

<APIResponse
  statusCode={"404"}
  description={"Secret not found"}
  contentType={"application/json"}
  schema={{"type":"object"}}
/>

<APIResponse
  statusCode={"500"}
  description={"Failed to delete secret"}
  contentType={"application/json"}
  schema={{"type":"object"}}
/>

## Try It

<APIPlayground
  method={"DELETE"}
  path={"/api/secrets/:id"}
  parameters={[{"name":"id","in":"path","required":true,"description":"ID of the secret to delete","schema":{"type":"string"}},{"name":"organizationId","in":"query","required":true,"description":"Organization ID","schema":{"type":"string"}}]}
  baseUrl={""}
/>


## Sitemap

See the full [sitemap](https://www.doc0.dev/docs/49c89830-117b-4def-8edc-b5bcc50766e0/llms.txt) for all pages in this wiki.
