> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete JWK

> Deletes an existing JWK (JSON Web Key) and undeploys it from all environments.

## Endpoint

```
DELETE /apiops/projects/{projectName}/jwks/{jwkName}/
```

## Authentication

Requires a Personal API Access Token.

### Header

```
Authorization: Bearer YOUR_TOKEN
```

## Request

### Headers

| Header        | Value            | Required |
| ------------- | ---------------- | -------- |
| Authorization | Bearer `{token}` | Yes      |

### Path Parameters

| Parameter   | Type   | Required | Description               |
| ----------- | ------ | -------- | ------------------------- |
| projectName | string | Yes      | Project name              |
| jwkName     | string | Yes      | Name of the JWK to delete |

## Response

### Success Response (200 OK)

```json theme={null}
{
  "success": true,
  "deploymentResult": {
    "success": true,
    "message": "Undeployment completed successfully",
    "environmentResults": [
      {
        "environmentName": "production",
        "success": true,
        "message": "Undeployed successfully"
      }
    ]
  }
}
```

### Error Response (400 Bad Request)

```json theme={null}
{
  "error": "bad_request",
  "error_description": "JWK (name: my-jwk) is not found!"
}
```

## cURL Example

```bash theme={null}
curl -X DELETE \
  "https://demo.apinizer.com/apiops/projects/MyProject/jwks/my-jwk/" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Notes and Warnings

* **Undeployment**:
  * JWK is automatically undeployed from all environments before deletion
  * Undeployment results are returned in the response

* **Dependencies**:
  * Ensure no policies or configurations reference this JWK before deletion
  * Deleting a JWK may break policies that depend on it

* **Permanent Action**:
  * Deletion is permanent and cannot be undone
  * Make sure to backup important JWKs before deletion

## Permissions

User must have **`SECRETS` + `MANAGE`** permission in the project. For undeployment operations (when undeploying JWKs from environments), user must also have **`SECRETS` + `DEPLOY_UNDEPLOY`** permission.

## Related Documentation

* [List JWKs](/api-reference/keys-secrets/crud/list-jwks) - List all JWKs
* [Get JWK](/api-reference/keys-secrets/crud/get-jwk) - Get a specific JWK
* [Create JWK](/api-reference/keys-secrets/crud/create-jwk) - Create a new JWK
