# Delete a credential

`DELETE https://api.cademi.com.br/api/v3/credentials/{credential_id}`

Operation ID: `credentials.delete` · API v3

Deletes a revoked or expired credential. After deletion, the credential is no longer returned by the API, while audit records that reference it are preserved.

Credentials that are still valid cannot be deleted and return the `state_conflict` error code. Revoke the credential with the update operation first.

A credential cannot delete itself.

Required permissions: `credentials.manage`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `credential_id` | path | string | yes |  |

## Responses

### 204

The credential was deleted successfully.

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The credential was not found or is not accessible with the current credentials.

Body: Error.

### 409

The credential is neither revoked nor expired. Revoke it before deleting it.

Body: Error.

Full schema: https://cademi.dev/openapi/v3.json
