<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Conducting Phishing Awareness Campaigns

## Agent Script

### Commands

| Command | Description |
|---|---|
| `node agent.js create-campaign --pretext password-reset --targets staff.csv` | Create a new phishing campaign |
| `node agent.js analyze-results --campaign-id 42` | Analyze campaign results and generate report |
| `node agent.js generate-pretext --difficulty medium --theme it-support` | Generate phishing pretext template |
| `node agent.js remediate --repeat-clickers report.json` | Generate remediation plan for repeat offenders |

### Examples

```bash
# Primary workflow
node agent.js create-campaign --pretext password-reset --targets staff.csv

# Secondary analysis
node agent.js analyze-results --campaign-id 42

# Generate deliverable
node agent.js generate-pretext --difficulty medium --theme it-support

# Measure and report
node agent.js remediate --repeat-clickers report.json
```

## External Tools

| Tool | Command | Purpose |
|---|---|---|
| GoPhish | `gophish-cli --create-campaign` | Open source phishing framework |
| KnowBe4 | `knowbe4 --launch-campaign` | Commercial phishing simulation |
| curl | `curl -X POST https://gophish-server/api/campaigns` | GoPhish REST API |

## Campaign Pretext Library

| Pretext | Difficulty | Success Rate |
|---|---|---|
| IT password reset | Easy | 15-25% |
| Package delivery | Easy | 10-20% |
| Shared document | Medium | 8-15% |
| Executive request | Medium | 5-12% |
| Invoice/payment | Hard | 3-8% |
| MFA enrollment | Hard | 2-6% |
