CYBERDOC DOCS

API Reference

All CyberDoc API endpoints are served at the /api/ path prefix. Endpoints are grouped by authentication level and feature area.

Base URL. All endpoints are relative to the deployment origin. For production: https://cyberdoc.cintelis.ai/api/

Authentication

TypeApplies ToMechanism
NonePublic endpointsNo auth required. Turnstile token may be required for bot protection.
SessionAuth & Dashboard endpointscyberdoc_session cookie. Set on login via /api/auth/email/login, magic link, or Google OAuth.
Session + PlanBilling-gated endpointsSession cookie + active Pro, Business, or Enterprise subscription.
AdminAdmin endpointsSession with is_admin flag, or legacy X-Admin-Key header.

Common Response Format

All endpoints return JSON. Successful responses include the data directly. Errors use a standard envelope:

// Success (varies by endpoint)
{ "scan_id": "scan_abc123", "status": "created" }

// Error
{
  "error": "Not found",
  "code": "SCAN_NOT_FOUND",
  "status": 404
}

Public Endpoints

POST /api/lead

Create a new scan lead (initiates a CyberDoc session).

PropertyDetail
AuthNone (Turnstile token required)
Content-Typeapplication/json

Request body:

{
  "name": "Jane Smith",
  "email": "[email protected]",
  "domain": "example.com",        // optional
  "turnstile_token": "0.xxx..."   // Cloudflare Turnstile response
}

Response (201):

{
  "scan_id": "scan_a1b2c3d4",
  "status": "IN PROGRESS",
  "created_at": "2026-03-28T10:30:00Z"
}

POST /api/breach-check

Check an email address against known breach databases.

Request body:

{
  "email": "[email protected]"
}

POST /api/social-check

Check a username against 640+ public platforms for digital footprint exposure.

Request body:

{
  "username": "janesmith"
}

POST /api/report

Submit scan results (GP answers and/or pen test findings) for a scan session.

PropertyDetail
AuthNone
Content-Typeapplication/json

Request body:

{
  "scan_id": "scan_a1b2c3d4",
  "gp_answers": {
    "device": 0,
    "purpose": 2,
    "password_manager": 1,
    "password_reuse": 2,
    "two_factor": 0,
    "updates": 1,
    "phishing": 0,
    "wifi": 2,
    "backups": 1,
    "social_privacy": 0
  },
  "pentest_results": [
    {
      "id": "fingerprint",
      "name": "Browser Fingerprint Analysis",
      "severity": "medium",
      "finding": "Browser is uniquely identifiable across 94% of tested configurations"
    }
  ]
}

Response (200):

{
  "scan_id": "scan_a1b2c3d4",
  "status": "PEN TEST COMPLETE",
  "overall_score": 62,
  "categories": {
    "passwords": { "score": 3, "max": 6 },
    "authentication": { "score": 1, "max": 3 }
  }
}

GET /api/report?id=

Retrieve a previously submitted scan report.

POST /api/consent

Record pen test consent with audit trail.

Request body:

{
  "scan_id": "scan_a1b2c3d4",
  "consent_type": "pentest",
  "turnstile_token": "0.xxx..."
}

Response (201):

{
  "consent_id": "con_x1y2z3",
  "scan_id": "scan_a1b2c3d4",
  "type": "pentest",
  "ip": "203.0.113.10",
  "timestamp": "2026-03-28T10:32:15Z"
}

POST /api/analyze

Send all scan results to Anthropic Claude for AI diagnosis.

Request body:

{
  "scan_id": "scan_a1b2c3d4"
}

Response (200):

{
  "scan_id": "scan_a1b2c3d4",
  "diagnosis": "Based on your scan results, your overall cyber health...",
  "prescriptions": [
    {
      "priority": 1,
      "category": "credentials",
      "text": "Your email was found in 7 data breaches...",
      "severity": "critical"
    }
  ],
  "overall_assessment": "NEEDS ATTENTION",
  "model": "claude-sonnet-4-20250514"
}

POST /api/deepscan

Initiate a server-side Lab scan on a target domain.

Request body:

{
  "scan_id": "scan_a1b2c3d4",
  "target": "example.com"
}

Response (202):

{
  "scan_id": "scan_a1b2c3d4",
  "status": "LAB SCAN IN PROGRESS",
  "estimated_duration_seconds": 300
}

GET /api/deepscan?id=

Poll for Lab scan progress and results.

Response (200):

{
  "scan_id": "scan_a1b2c3d4",
  "status": "COMPLETE",
  "tools": {
    "nmap": { "status": "complete", "findings": [...], "raw": "..." },
    "nuclei": { "status": "complete", "findings": [...], "raw": "..." }
  },
  "completed_at": "2026-03-28T10:37:42Z"
}

GET /api/export?id=

Export scan results as a downloadable file.

Voice Endpoints

POST /api/voice

Get an ephemeral xAI voice token and system instructions for a voice agent session.

Request body:

{
  "scan_id": "scan_a1b2c3d4"   // optional, provides context
}

POST /api/voice-log

Store a voice conversation transcript after the session ends.

Request body:

{
  "scan_id": "scan_a1b2c3d4",
  "transcript": [
    { "role": "agent", "text": "Hello, I'm CyberDoc...", "ts": 0 },
    { "role": "user", "text": "Hi, can you explain...", "ts": 4.2 }
  ],
  "duration_seconds": 245
}

Dashboard Endpoints

All dashboard endpoints require authentication and an active Pro, Business, or Enterprise plan. Prefixed with /api/dashboard.

MethodEndpointDescription
GET/api/dashboard/statsWorkspace scan statistics
GET/api/dashboard/scansList scans (filterable by type)
GET/api/dashboard/scans/:idGet scan details with findings
GET/api/dashboard/report/:idGenerate HTML report for a scan
GET/api/dashboard/usageCurrent month scan usage vs quota
GET/api/dashboard/geoGeo-located threat data for threat map
GET/api/dashboard/whitelabelGet white-label branding settings
PUT/api/dashboard/whitelabelUpdate white-label settings (Enterprise only)

Red Team Endpoints

All red team endpoints require authentication and Business or Enterprise plan. Prefixed with /api/redteam. See the Red Team documentation for detailed descriptions.

Engagements

MethodEndpointDescription
POST/api/redteam/launchStart engagement (target, playbook, scope, mode)
GET/api/redteam/status?id=Poll engagement status
GET/api/redteam/result?id=Full results with structured findings
GET/api/redteam/notes?id=Raw PentestAgent notes
POST/api/redteam/cancelCancel running engagement
GET/api/redteam/engagementsList workspace engagements
GET/api/redteam/engagements/:idGet single engagement details
POST/api/redteam/engagement/:id/archiveArchive engagement
POST/api/redteam/engagement/:id/unarchiveRestore archived engagement
DELETE/api/redteam/engagement/:idDelete engagement (admin)

Analysis & Chain Verification

MethodEndpointDescription
POST/api/redteam/reanalyze/:idRe-run multi-agent analysis
POST/api/redteam/exploit-chain/:idExecute attack chain with Kali commands
POST/api/redteam/custom-chain/:idExecute custom chain with user parameters

Artifacts, Reports & Domains

MethodEndpointDescription
GET/api/redteam/artifacts/:idList engagement artifacts
GET/api/redteam/artifact/:id/:filenameDownload artifact file
GET/api/redteam/report/:idGenerate branded HTML report
POST/api/redteam/verify-domainRequest domain verification token
POST/api/redteam/check-verificationCheck verification status
GET/api/redteam/domainsList verified domains

Operator, Expert & Metrics

MethodEndpointDescription
POST/api/redteam/voiceGet voice token for operator agent
POST/api/redteam/conversationCreate/send operator conversation
GET/api/redteam/conversationsList operator conversations
DELETE/api/redteam/conversation/:idDelete conversation
POST/api/redteam/expert/:actionStart/stop/status Expert EC2
POST/api/redteam/expert-healthCheck Expert readiness
GET/api/redteam/metricsEngagement metrics (admin)

Auth Endpoints

See Auth & Billing for full details. All prefixed with /api/auth.

MethodEndpointDescription
POST/api/auth/email/registerCreate account
POST/api/auth/email/loginLogin with email + password
POST/api/auth/magic-link/sendSend magic link email
GET/api/auth/magic-link/verifyVerify magic link token
POST/api/auth/password/changeChange password
POST/api/auth/password/setSet password (first time)
POST/api/auth/password/forgotSend reset email
POST/api/auth/password/resetReset with token
POST/api/auth/totp/setupGenerate TOTP secret
POST/api/auth/totp/verifyVerify and enable TOTP
POST/api/auth/totp/disableDisable TOTP
GET/api/auth/meCurrent user info
GET/api/auth/subscriptionCurrent plan tier
POST/api/auth/logoutRevoke session

Billing Endpoints

Prefixed with /api/billing.

MethodEndpointDescription
POST/api/billing/webhookStripe webhook (no auth, signature verified)
POST/api/billing/checkoutCreate Stripe checkout session
POST/api/billing/portalOpen Stripe billing portal
GET/api/billing/subscriptionGet subscription details
POST/api/billing/cancelCancel subscription

Admin Endpoints

Require admin privileges. Prefixed with /api/admin.

MethodEndpointDescription
GET/api/admin/scansGlobal scan index
GET/api/admin/scans?id=Get specific scan
DELETE/api/admin/scans?id=Delete scan
DELETE/api/admin/scans?purge=allDelete all scans
POST/api/admin/lab-scansCreate lab scan record
POST/api/admin/targetedProxy to scanner /targeted endpoint
GET/api/admin/ticketsList infrastructure tickets
PATCH/api/admin/ticketsUpdate ticket status
POST/api/admin/voice-logQuery voice logs

Rate Limits

EndpointLimitWindow
Auth (login/register)5 requestsper 60 seconds per IP
Magic link1 requestper 60 seconds per email
Lead capture10 requestsper minute per IP
Breach check100 requestsper day per IP
Social check30 requestsper hour per IP
AI Analysis10 requestsper hour per IP
Voice5 sessionsper hour per IP