---
title: "Delete Provider Secret"
api: "DELETE /api/v1/providers/secrets/{id}"
description: "Remove a provider secret permanently."
---

Delete a provider secret. This removes the credentials used to authenticate with a cloud provider.

## Path Parameters

- `id` (required) - UUID of the secret to delete

## Example Request

```bash
curl -X DELETE "https://api.prowler.com/api/v1/providers/secrets/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/vnd.api+json"
```

## Response

### Success Response (204 No Content)

Returns no content on successful deletion.

### Error Responses

**404 Not Found** - Secret does not exist
```json
{
  "errors": [
    {
      "status": "404",
      "title": "Not Found",
      "detail": "Secret not found"
    }
  ]
}
```

**409 Conflict** - Secret is in use
```json
{
  "errors": [
    {
      "status": "409",
      "title": "Secret In Use",
      "detail": "Cannot delete secret that is currently associated with an active provider. Remove the provider first or update it to use different credentials."
    }
  ]
}
```

<Warning>
**Deleting a secret will:**
- Immediately prevent Prowler from accessing the cloud provider
- Stop all scheduled scans for the associated provider
- Make it impossible to run new scans until new credentials are added

This action cannot be undone.
</Warning>

<Note>
Before deleting a secret, ensure:
- The provider is no longer needed, OR
- New credentials have been added and tested, OR
- The provider has been deleted or updated to use different credentials
</Note>

<Tip>
Instead of deleting a secret when rotating credentials, use the update endpoint to replace the old credentials with new ones. This ensures zero downtime.
</Tip>
