Skip to content

Webhooks API ​

Receive real-time notifications for CyberOrigen events.

Professional and Enterprise

Webhooks are available on Professional and Enterprise plans.

Overview ​

Webhooks allow you to receive HTTP callbacks when events occur in CyberOrigen. Configure endpoints to receive notifications about scans, findings, compliance changes, and more.

Endpoints ​

MethodEndpointDescription
GET/api/v1/webhooksList webhooks
POST/api/v1/webhooksCreate webhook
GET/api/v1/webhooks/{id}Get webhook details
PATCH/api/v1/webhooks/{id}Update webhook
DELETE/api/v1/webhooks/{id}Delete webhook
POST/api/v1/webhooks/{id}/testSend test event
GET/api/v1/webhooks/{id}/deliveriesList delivery history

Create Webhook ​

bash
POST /api/v1/webhooks
Content-Type: application/json

{
  "name": "Security Alerts",
  "url": "https://your-server.com/webhooks/cyberorigen",
  "events": [
    "scan.completed",
    "vulnerability.critical",
    "vulnerability.high"
  ],
  "secret": "your-webhook-secret",
  "active": true
}

Parameters ​

FieldTypeRequiredDescription
namestringYesDescriptive name
urlstringYesHTTPS endpoint URL
eventsarrayYesEvents to subscribe to
secretstringNoSigning secret for verification
activebooleanNoEnable/disable webhook

Response ​

json
{
  "id": "webhook_abc123",
  "name": "Security Alerts",
  "url": "https://your-server.com/webhooks/cyberorigen",
  "events": ["scan.completed", "vulnerability.critical", "vulnerability.high"],
  "active": true,
  "created_at": "2025-12-21T10:00:00Z"
}

Available Events ​

Scan Events ​

EventDescription
scan.createdNew scan initiated
scan.startedScan execution started
scan.progressScan phase completed
scan.completedScan finished successfully
scan.failedScan failed with error

Vulnerability Events ​

EventDescription
vulnerability.foundNew vulnerability discovered
vulnerability.criticalCritical severity finding
vulnerability.highHigh severity finding
vulnerability.status_changedFinding status updated
vulnerability.resolvedFinding marked resolved

Compliance Events ​

EventDescription
control.status_changedControl status updated
evidence.uploadedNew evidence added
evidence.expiringEvidence approaching expiration
framework.score_changedCompliance score changed
audit.request_createdNew auditor request

Security Events ​

EventDescription
quarantine.threat_detectedMalware detected in upload
user.login_failedFailed login attempt
user.mfa_disabledMFA disabled on account

Webhook Payload ​

All webhook deliveries include:

json
{
  "id": "delivery_xyz789",
  "event": "scan.completed",
  "timestamp": "2025-12-21T15:30:00Z",
  "data": {
    // Event-specific data
  }
}

Example: Scan Completed ​

json
{
  "id": "delivery_xyz789",
  "event": "scan.completed",
  "timestamp": "2025-12-21T15:30:00Z",
  "data": {
    "scan_id": "scan_abc123",
    "target": "example.com",
    "status": "completed",
    "duration_seconds": 2700,
    "findings": {
      "total": 12,
      "critical": 1,
      "high": 3,
      "medium": 5,
      "low": 3
    }
  }
}

Example: Critical Vulnerability ​

json
{
  "id": "delivery_abc456",
  "event": "vulnerability.critical",
  "timestamp": "2025-12-21T15:35:00Z",
  "data": {
    "finding_id": "finding_xyz789",
    "title": "Remote Code Execution",
    "severity": "critical",
    "cvss_score": 9.8,
    "target": "example.com",
    "affected_component": "https://example.com/api/upload",
    "cve_ids": ["CVE-2024-1234"],
    "scan_id": "scan_abc123"
  }
}

Signature Verification ​

If you provide a secret, CyberOrigen signs each delivery with HMAC-SHA256.

Headers ​

X-CyberOrigen-Signature: sha256=abc123...
X-CyberOrigen-Event: scan.completed
X-CyberOrigen-Delivery: delivery_xyz789

Verification Example (Node.js) ​

javascript
const crypto = require('crypto');

function verifySignature(payload, signature, secret) {
  const expected = 'sha256=' + crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');

  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

// Express middleware
app.post('/webhooks/cyberorigen', (req, res) => {
  const signature = req.headers['x-cyberorigen-signature'];
  const payload = JSON.stringify(req.body);

  if (!verifySignature(payload, signature, process.env.WEBHOOK_SECRET)) {
    return res.status(401).send('Invalid signature');
  }

  // Process webhook...
  res.status(200).send('OK');
});

Verification Example (Python) ​

python
import hmac
import hashlib

def verify_signature(payload: bytes, signature: str, secret: str) -> bool:
    expected = 'sha256=' + hmac.new(
        secret.encode(),
        payload,
        hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(signature, expected)

# Flask route
@app.route('/webhooks/cyberorigen', methods=['POST'])
def webhook():
    signature = request.headers.get('X-CyberOrigen-Signature')

    if not verify_signature(request.data, signature, WEBHOOK_SECRET):
        return 'Invalid signature', 401

    # Process webhook...
    return 'OK', 200

Test Webhook ​

Send a test event to verify your endpoint:

bash
POST /api/v1/webhooks/{webhook_id}/test

Response ​

json
{
  "delivery_id": "delivery_test123",
  "status": "success",
  "response_code": 200,
  "response_time_ms": 145
}

Delivery History ​

View webhook delivery attempts:

bash
GET /api/v1/webhooks/{webhook_id}/deliveries

Response ​

json
{
  "items": [
    {
      "id": "delivery_xyz789",
      "event": "scan.completed",
      "status": "success",
      "response_code": 200,
      "response_time_ms": 145,
      "attempts": 1,
      "created_at": "2025-12-21T15:30:00Z",
      "delivered_at": "2025-12-21T15:30:00Z"
    },
    {
      "id": "delivery_abc456",
      "event": "vulnerability.critical",
      "status": "failed",
      "response_code": 500,
      "response_time_ms": 2000,
      "attempts": 3,
      "error": "Connection timeout",
      "created_at": "2025-12-21T15:35:00Z",
      "next_retry": "2025-12-21T16:35:00Z"
    }
  ],
  "total": 156
}

Retry Policy ​

Failed deliveries are retried automatically:

AttemptDelay
1Immediate
25 minutes
330 minutes
42 hours
58 hours

After 5 failed attempts, the delivery is marked as failed and the webhook is disabled if failures persist.

Best Practices ​

  1. Always verify signatures to ensure authenticity
  2. Respond quickly (within 30 seconds) to avoid timeouts
  3. Return 2xx status to acknowledge receipt
  4. Process asynchronously for long-running operations
  5. Implement idempotency using delivery IDs
  6. Monitor delivery status and fix failing endpoints promptly

Rate Limits ​

PlanWebhooksEvents/Hour
Professional51,000
EnterpriseUnlimited10,000

Agentic AI-Powered Security & Compliance