API v2.0 Updated July 2025

API Documentation

Integrate vulnerability scanning, asset management, and breach detection into your workflows with our comprehensive REST API.

01. Quick Start

1

Get your API key

Sign in to the dashboard and navigate to Settings → API Keys.

2

Authenticate

Include your token in every request header.

Authorization: Bearer YOUR_API_KEY
3

Start a scan

POST to /api/scan with your target.

4

Get results

Poll /api/scan/{id} or connect via WebSocket for real-time updates.

02. Authentication

The API uses JWT Bearer tokens. Obtain a token via POST /api/auth/login, then include it in every request.

Access token: Expires in 60 minutes. Returned in the access_token field.

Refresh: Re-authenticate via POST /api/auth/login when the token expires. A 401 response indicates an expired or invalid token.

API Key (alternative): Generate a long-lived API key from the dashboard. Pass it as a Bearer token in the same way.

Login & obtain token
curl -X POST https://findthebreach.com/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"user@example.com","password":"s3cureP@ss"}'

# Response
{
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "token_type": "bearer",
  "expires_in": 3600,
  "user": { "id": 1, "username": "user@example.com", "tier": "standard" }
}

Authentication Endpoints

Authenticate with username and password. Returns a JWT access token.

Request Body

{ "username": "user@example.com", "password": "your_password" }

Response 200

{
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "token_type": "bearer",
  "expires_in": 3600,
  "user": { "id": 1, "username": "user@example.com", "tier": "standard" }
}

Register a new user account. Returns user object and access token.

Request Body

{ "username": "newuser@example.com", "password": "s3cureP@ss", "company": "Acme Corp" }

Response 201

{ "user": { "id": 42, "username": "newuser@example.com" }, "access_token": "eyJ..." }

Returns the authenticated user's profile, subscription tier, and usage stats.

Response 200

{ "id": 1, "username": "user@example.com", "tier": "standard", "scans_used": 12, "scans_limit": 50 }

Update the authenticated user's profile fields (company, notification preferences).

Request Body

{ "company": "New Corp", "notifications_email": true }

Change the authenticated user's password. Requires current password.

Request Body

{ "current_password": "old_pass", "new_password": "new_s3cure_pass" }

Sends a password reset link to the user's email address.

Request Body

{ "email": "user@example.com" }

Complete password reset using the token from the email link.

Request Body

{ "token": "abc123resettoken", "new_password": "new_s3cure_pass" }

Scanning Endpoints

Launch a new vulnerability scan against a target. Supports multiple scan types and notification options.

Request Body

{
  "target": "example.com",
  "scan_type": "full",
  "notify_email": true,
  "scanners": ["nmap", "nikto", "zap"],
  "schedule": null
}

Response 202

{ "scan_id": "sc_7f3a9b2e", "status": "queued", "estimated_time": "15 min" }
curl -X POST https://findthebreach.com/api/scan \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"target":"example.com","scan_type":"full"}'

Retrieve the current status, progress, findings, severity breakdown, and remediation guidance for a scan.

Path Parameters

id string, required — The scan ID returned from POST /api/scan.

Response 200

{
  "scan_id": "sc_7f3a9b2e",
  "target": "example.com",
  "status": "completed",
  "progress": 100,
  "findings_count": 7,
  "severity": { "critical": 1, "high": 2, "medium": 3, "low": 1 },
  "started_at": "2025-07-01T10:00:00Z",
  "completed_at": "2025-07-01T10:14:32Z"
}

List all scans for the authenticated user. Supports pagination and status filtering.

Query Parameters

page int, default 1
per_page int, default 20
status string — queued, running, completed, failed

Stop a running or queued scan. Partial results are retained.

Response 200

{ "scan_id": "sc_7f3a9b2e", "status": "stopped", "partial_results": true }

View the current scan queue, including your position and estimated wait time.

Response 200

{ "queue_length": 3, "your_position": 1, "estimated_wait": "2 min" }

Report Endpoints

Download the scan report as a PDF file. Returns binary data with Content-Type: application/pdf.

Get the scan report as rendered HTML, suitable for embedding or browser viewing.

Get an AI-generated executive summary with prioritized remediation steps.

Response 200

{
  "summary": "7 vulnerabilities found. 1 critical SQL injection in /login endpoint...",
  "risk_score": 8.2,
  "top_actions": ["Patch SQL injection in /login", "Update TLS to 1.3", "Add CSP headers"]
}

List all reports available in the client portal. Supports pagination and date range filters.

Asset Endpoints

List all monitored assets (domains, IPs, applications) in your account.

Response 200

{
  "assets": [
    { "id": "ast_1", "type": "domain", "value": "example.com", "last_scan": "2025-07-01T10:14:32Z", "risk_grade": "B" }
  ],
  "total": 5
}

Add a new asset to your monitored inventory.

Request Body

{ "type": "domain", "value": "newsite.com", "tags": ["production"] }

Update an existing asset's metadata, tags, or monitoring settings.

Remove an asset from monitoring. Historical scan data is retained for 90 days.

List all known vulnerabilities for a specific asset, including severity and remediation status.

Vulnerability Endpoints

List all discovered vulnerabilities across scans. Filter by severity, status, or asset.

Query Parameters

severity string — critical, high, medium, low, info
status string — open, resolved, false_positive, accepted
asset_id string — filter by asset

Get aggregate vulnerability statistics: counts by severity, trends over time, and mean-time-to-remediate.

Response 200

{ "total": 42, "critical": 3, "high": 10, "medium": 18, "low": 11, "mttr_hours": 72 }

Update the status of a vulnerability (resolve, mark as false positive, or accept risk).

Request Body

{ "status": "resolved", "note": "Patched in v2.3.1" }

Portal Endpoints

List all scan requests submitted through the client portal.

Submit a new scan request through the portal with target and preferred scan type.

Request Body

{ "target": "example.com", "scan_type": "pentest", "notes": "Focus on auth endpoints" }

Get a comprehensive attack surface overview: exposed services, subdomains, open ports, and risk scores.

Response 200

{
  "domains": 3, "subdomains": 12, "open_ports": 47,
  "exposed_services": ["HTTP", "SSH", "SMTP"],
  "risk_score": 6.8
}

Check if an email address appears in known data breaches. Returns breach sources and dates.

Response 200

{ "breached": true, "count": 3, "breaches": [{ "source": "Example Corp", "date": "2024-03", "data_types": ["email","password_hash"] }] }

Detect the technology stack of a target: web server, CMS, frameworks, JavaScript libraries, and CDN.

Response 200

{ "web_server": "nginx/1.25", "cms": "WordPress 6.4", "frameworks": ["React"], "cdn": "Cloudflare" }

Utility Endpoints

Look up a CVE by ID. Returns description, CVSS score, affected products, and references.

Response 200

{
  "cve_id": "CVE-2024-1234",
  "description": "Remote code execution in...",
  "cvss": 9.8,
  "severity": "critical",
  "published": "2024-06-15"
}

Analyze HTTP security headers and return a letter grade (A+ through F) with per-header breakdown.

Response 200

{ "grade": "B", "headers": { "Strict-Transport-Security": "present", "Content-Security-Policy": "missing", "X-Frame-Options": "present" } }

Returns an SVG security status badge for embedding in READMEs, dashboards, or websites. Shows current risk grade.

Submit a contact request or support inquiry programmatically.

Request Body

{ "name": "Jane Doe", "email": "jane@example.com", "subject": "API question", "message": "..." }

WebSocket

Connect via WebSocket to receive real-time scan progress, findings as they're discovered, and completion events.

Event Types

EventDescription
progressScan progress update (percentage, current scanner)
findingNew vulnerability discovered during scan
scanner_startIndividual scanner module started
scanner_completeIndividual scanner module finished
scan_completeEntire scan finished — includes final summary

JavaScript Example

const ws = new WebSocket(`wss://findthebreach.com/ws/scan/${scanId}?token=${TOKEN}`);
ws.onmessage = (e) => {
  const data = JSON.parse(e.data);
  if (data.type === "progress") console.log(`${data.percent}% — ${data.scanner}`);
  if (data.type === "finding") console.log(`Found: ${data.title} [${data.severity}]`);
  if (data.type === "scan_complete") console.log("Done!", data.summary);
};

03. Try It Preview

Interactive API testing coming soon. Use the code examples above to test endpoints now.

04. Scan Types

TypeDescription~DurationTier
fullComplete vulnerability assessment — all scanners15–45 minStandard+
quickFast top-10 vulnerability check2–5 minFree+
ports_onlyPort scan and service detection only3–8 minFree+
web_onlyWeb application vulnerabilities (XSS, SQLi, CSRF, etc.)10–30 minStandard+
pentestSimulated penetration test with exploit validation30–90 minPremium
reconPassive reconnaissance — OSINT, DNS, subdomain enumeration5–15 minStandard+

05. Scanners

NmapFree

Port scanning & service detection

NiktoFree

Web server misconfiguration scanner

OWASP ZAPStandard

Dynamic application security testing

NucleiStandard

Template-based vulnerability scanner

SSLyzeStandard

TLS/SSL configuration analysis

SQLMapPremium

Automated SQL injection detection

MetasploitPremium

Exploit validation framework

SubfinderFree

Subdomain discovery

WhatWebStandard

Technology fingerprinting

06. Error Codes

CodeMeaningCommon Cause
400Bad RequestMissing required field or invalid JSON body
401UnauthorizedMissing, expired, or invalid Bearer token
403ForbiddenInsufficient tier or permissions for this endpoint
404Not FoundResource does not exist (invalid scan ID, asset ID, etc.)
429Too Many RequestsRate limit exceeded — check X-RateLimit-Reset header
500Internal Server ErrorUnexpected error — retry or contact support

All errors return a JSON body: {"error": "message", "code": 400, "details": "..."}

07. Rate Limiting

TierRequests/hourConcurrent scansBurst
Free100120/min
Standard1,0005100/min
Premium10,00020500/min
EnterpriseUnlimitedUnlimitedCustom

Response headers:

X-RateLimit-Limit — Your tier's hourly limit

X-RateLimit-Remaining — Requests remaining in current window

X-RateLimit-Reset — UTC epoch seconds when the window resets

08. Webhooks & Notifications

Configure webhook URLs in the dashboard under Settings → Integrations → Webhooks. We'll send POST requests for scan events.

Supported Events

scan.started scan.completed scan.failed finding.critical report.ready

Webhook Payload Example

{
  "event": "scan.completed",
  "timestamp": "2025-07-01T10:14:32Z",
  "data": {
    "scan_id": "sc_7f3a9b2e",
    "target": "example.com",
    "findings_count": 7,
    "severity": { "critical": 1, "high": 2, "medium": 3, "low": 1 }
  }
}

Webhooks include an X-Signature-256 header for payload verification using your webhook secret.

Get Your API Key

Sign in to generate your API key and start automating security scans.

Get Your API Key →