secrets_delete
DELETE
/secrets/{id}
const url = 'https://api.canopyhq.dev/secrets/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.canopyhq.dev/secrets/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
A secret’s identifier within its owning tenant, never its value.
string
The secret to delete.
Responses
Section titled “Responses”The secret was deleted.
No console token, or one that did not verify.
Only an owner may delete a secret.
The tenant owns no secret by that name.
Inference options or connections still reference this secret; nothing is cascaded.
Media typeapplication/json
Resources that must stop naming a secret before it can be deleted.
object
connections
required
Array<string>
inferences
required
Array<string>
message
required
string
Examplegenerated
{ "connections": [ "example" ], "inferences": [ "example" ], "message": "example"}