<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
# Secure Data Deletion — API Reference

## Audit Retention Compliance

```bash
node scripts/agent.js --action audit --input /tmp/data_inventory.json --retention-days 365
```

## Generate Deletion Plan

```bash
node scripts/agent.js --action plan --input /tmp/retention_audit.json
```

## Verify Deletion

```bash
node scripts/agent.js --action verify --input /tmp/deletion_plan.json
```

## Sanitization Methods by Media

| Media | Clear | Purge | Destroy |
|-------|-------|-------|---------|
| HDD | Single-pass overwrite | Degaussing / 3-pass | Physical shredding |
| SSD | ATA Secure Erase | Crypto-erase | Shredding |
| Cloud | API deletion | Destroy KMS key | Provider responsibility |
| Database | DELETE + verify | DELETE + VACUUM FULL | Drop + sanitize storage |

## Retention Audit Output

```json
{
  "name": "customer_backup_2023",
  "media_type": "cloud",
  "sensitivity": "restricted",
  "age_days": 540,
  "reason": "age 540d exceeds 365d retention"
}
```

## Deletion Plan Output

```json
{
  "name": "customer_backup_2023",
  "media_type": "cloud",
  "sanitization_level": "purge",
  "method": "Cryptographic erasure (destroy KMS encryption key)",
  "verification": "Post-deletion scan + row count verification"
}
```
