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

## M365 Compliance PowerShell
```powershell
Get-DlpCompliancePolicy | Format-List Name, Mode
Get-DlpComplianceRule | Format-List Name, Policy
Get-DlpSensitiveInformationType | Select Name
```

## Exchange Transport Rules
```powershell
Get-TransportRule | Where { $_.MessageContainsDataClassifications } | Format-List
```

## Regex Pattern Reference
```
Credit card:  \b(?:4\d{12}(?:\d{3})?|5[1-5]\d{14})\b
SSN:          \b\d{3}-\d{2}-\d{4}\b
AWS key:      AKIA[0-9A-Z]{16}
```
