Automate security testing.
The ScanRub REST API lets you trigger scans, retrieve findings, and integrate security testing into your CI/CD pipeline. Available on the Premium plan.
Quick Start
Generate one from the dashboard (Settings → API Keys). Requires the Premium plan.
POST /api/v1/scans with a target. Returns a scan_id immediately.
Poll GET /api/v1/scans/{id} until status is "completed", then pull findings or run the CI/CD gate check.
Authentication
All API requests require a Bearer token. API access is available on the Premium plan - generate a key from the dashboard under Settings → API Keys. Free-plan accounts cannot create keys.
Authorization: Bearer srub_live_YOUR_KEYEndpoints
Base URL: https://api.scanrub.com
/api/v1/scansQueue a new scan against a target. The scan is scoped to your account - the same as starting one from the dashboard.
{
"target": "https://example.com",
"profile": "standard"
}{
"scan_id": "68b1f2a9c4e5d6f7a8b9c0d1",
"status": "running",
"target": "https://example.com",
"created_at": "2026-07-01T14:23:00Z"
}/api/v1/scans/{scan_id}Retrieve the current status, phase progress, stats, and quality score of a scan.
{
"scan_id": "68b1f2a9c4e5d6f7a8b9c0d1",
"status": "completed",
"target": "https://example.com",
"profile": "standard",
"started_at": "2026-07-01T14:23:00Z",
"completed_at": "2026-07-01T14:28:14Z",
"phases": { "recon": {}, "analysis": {}, "testing": {}, "browser": {} },
"stats": {
"critical": 1,
"high": 3,
"medium": 5,
"low": 12
},
"quality_score": 92
}/api/v1/scans/{scan_id}/findingsGet all findings from a scan. Filter by severity with ?severity=critical|high|medium|low|info.
{
"findings": [
{
"id": "68b1f3...",
"type": "sqli",
"severity": "critical",
"title": "SQL Injection in search parameter",
"url": "https://example.com/search?q=",
"evidence": "...",
"remediation": "...",
"confidence": 0.94
}
],
"total": 21
}/api/v1/scans/{scan_id}/gateCompare a scan against a baseline (?compareTo=<baseline_scan_id>) and get a pass/fail verdict for use in a CI pipeline. Fails on any new critical or high severity finding - new medium/low findings are reported but do not block.
// GET /api/v1/scans/{scan_id}/gate?compareTo=68a0...
{
"pass": false,
"scan_id": "68b1f2a9c4e5d6f7a8b9c0d1",
"compare_to": "68a0d1e2f3a4b5c6d7e8f9a0",
"newFindings": [
{ "severity": "high", "title": "Reflected XSS in ?redirect=", "url": "..." }
],
"summary": {
"newCritical": 0,
"newHigh": 1,
"newMedium": 2,
"newLow": 0
}
}Rate Limits
Rate limit info is returned in RateLimit-* response headers. Exceeded requests return 429 Too Many Requests.