--- title: "Delete secrets" --- In this example, we demonstrate how to delete secrets Prerequisites: - Set up and add envars to [Infisical Cloud](https://app.infisical.com) - Grasp a basic understanding of the system and its underlying cryptography [here](/api-reference/overview/introduction). ## Example ```js const deleteSecrets = async () => { const API_KEY = "your_api_key"; const SECRET_ID = "ID"; // ID of secret to delete // 6. Send ID(s) of secret(s) to delete to the Infisical API await axios.delete( `https://api.infisical.com/api/v2/secrets`, { secretIds: SECRET_ID, }, { headers: { "X-API-KEY": API_KEY, }, } ); }; deleteSecrets(); ```