Arcane API Documentation

Simple integration for AI security scanning, threat detection, and analytics

Quick Start

All requests require API key in headers:

Headers
const headers = {
  apiKey: "arcane_key_171928728292"
};

Security Scanner

POST /api/scan/email

Scan email addresses for security threats and authenticity

Request Example
const response = await axios.post(`${ARCANE_ENDPOINT}/api/scan/email`, {
  content: "fake@gmail.com"
}, {
  headers: {
    apiKey: "your_api_key_here"
  }
});

const { success, data, redirect, message } = response.data;
if (!success) return;

console.log(data.scan); // AI scanning result
Response Example
{
  success: true,
  data: {
    scan: {
      content: "fake@gmail.com",
      scoreName: "threat",
      scoreLevel: 80,
      user_id: "user_123456",
      description: "This email is a malicious and fake email, someone is trying to fake the system",
      type: "email",
      requestType: "api",
      requestUrl: "https://arcane-security.com.ng"
    }
  },
  message: "Scan completed successfully"
}
Response Fields Explained:
  • scoreName: "threat" | "safe" | "neutral" - Overall threat classification
  • scoreLevel: 0-100 - Numeric threat score (higher = safer)
  • description: AI-generated analysis of the threat
  • type: "email" | "website" | "invoice" | "content" - What was scanned
POST /api/scan/website

Scan websites and URLs for security threats

Request Example
const response = await axios.post(`${ARCANE_ENDPOINT}/api/scan/website`, {
  content: "https://suspicious-site.com"
}, {
  headers: {
    apiKey: "your_api_key_here"
  }
});

const { success, data } = response.data;
if (!success) {
  console.error('Scan failed:', data.message);
  return;
}

// Use the scan results
const scanResult = data.scan;
if (scanResult.scoreName === 'threat') {
  console.warn('⚠️ Threat detected:', scanResult.description);
}

AI Integration

POST /api/chat

Chat with Arcane AI for security assistance and guidance

Request Example
const response = await axios.post(`${ARCANE_ENDPOINT}/api/chat`, {
  message: "Hello, can you help me with security?",
  oldChat: "previous conversation context"
}, {
  headers: {
    apiKey: "your_api_key_here"
  }
});

const { success, data } = response.data;
if (success) {
  console.log('AI Response:', data.answer);
}

Analytics

GET /api/analytics/all

Get comprehensive analytics data in a single request

Request Example
const response = await axios.get(`${ARCANE_ENDPOINT}/api/analytics/all`, {
  headers: {
    apiKey: "your_api_key_here"
  }
});

const { success, data } = response.data;
if (success) {
  console.log('Total scans:', data.totalScans);
  console.log('Threat scans:', data.threatScans);
  console.log('Safe scans:', data.safeScans);
  console.log('Accuracy:', data.scanAccuracy + '%');
  console.log('API Usage:', data.apiUsage + '%');
}
Response Example
{
  success: true,
  data: {
    totalScans: 150,
    threatScans: 12,
    safeScans: 125,
    neutralScans: 13,
    scanAccuracy: 83,
    apiUsage: 65,
    lastScan: {
      content: "last scanned item...",
      scoreName: "safe",
      type: "email"
    }
  }
}