Scans API

Create and manage security scans programmatically.

Create a Scan

POST /v1/scans
curl -X POST https://api.hackerbot.io/v1/scans \
  -H "Authorization: Bearer hb_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "target": "https://staging.example.com",
    "profile": "standard",
    "project_id": "proj_abc123",
    "config": {
      "authenticated": false,
      "exclude_paths": ["/logout", "/api/health"]
    }
  }'

Response

{
  "id": "scan_xyz789",
  "status": "queued",
  "target": "https://staging.example.com",
  "profile": "standard",
  "created_at": "2026-01-23T10:00:00Z",
  "estimated_duration": 2400
}

Get Scan Status

GET /v1/scans/:id
curl https://api.hackerbot.io/v1/scans/scan_xyz789 \
  -H "Authorization: Bearer hb_live_xxxx"

Response

{
  "id": "scan_xyz789",
  "status": "running",
  "progress": 45,
  "target": "https://staging.example.com",
  "started_at": "2026-01-23T10:01:00Z",
  "findings_count": {
    "critical": 1,
    "high": 3,
    "medium": 7,
    "low": 12
  }
}

List Scans

GET /v1/scans

Query parameters:

project_id Filter by project
status queued, running, completed, failed
limit Results per page (default: 20, max: 100)
offset Pagination offset

Cancel a Scan

DELETE /v1/scans/:id
curl -X DELETE https://api.hackerbot.io/v1/scans/scan_xyz789 \
  -H "Authorization: Bearer hb_live_xxxx"

Scan Statuses

  • queued — Waiting to start
  • running — Scan in progress
  • completed — Finished successfully
  • failed — Error occurred
  • cancelled — Manually stopped