putty
API ReferenceLedger

Delete a secret

Removes the secret and its value. Pass `?projectId=` to delete the project-scoped secret of that name; without it the user-scoped secret is removed. Answers 404 for a secret that is not the caller's, the same as for one that does not exist.

DELETE
/secrets/{name}

Removes the secret and its value. Pass ?projectId= to delete the project-scoped secret of that name; without it the user-scoped secret is removed. Answers 404 for a secret that is not the caller's, the same as for one that does not exist.

Authorization

bearerAuth
AuthorizationBearer <token>

A bearer token. The Account routes accept a Privy access token; the MCP transport accepts an sk- API key issued by POST /account/api-keys.

In: header

Path Parameters

name*string

The environment-variable-shaped name of the secret. PRIVATE_KEY, MNEMONIC, and SEED_PHRASE are refused.

Match^[A-Z][A-Z0-9_]{0,63}$

Query Parameters

projectId?string

Delete the project-scoped secret of this name.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/secrets/string"
Empty