Overview
SecuriLayer can be integrated in multiple ways depending on your platform and use case. This guide covers the most common integration patterns.
Quick Start (5 minutes)
Get Access
Start the Telegram bot @SecuriLayerAI_Bot and authenticate. You'll receive a JWT token automatically. For API-only access, create an API key from the Web Admin panel.
Check Your First URL
Send a POST request with your token:
curl -X POST https://api.securilayer.dev/v1/decision/url \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "platform": "api"}'
Read the Verdict
The response contains a Decision Contract with verdict (allow/warn/block), confidence (0–1), reasons (array of deterministic explanations), and evidence_refs.
Telegram Bot Integration
Add to Group
- Add
@SecuriLayerAI_Botto your Telegram group - Grant admin permissions (delete messages, ban users)
- The bot starts scanning URLs automatically
- Configure policy via
/settingsor the Web Admin panel
Commands
| Command | Context | Description |
|---|---|---|
/check <url> | DM / Group | Check a URL, returns verdict with reasons |
/start | DM | Welcome message and bot info |
/sdr | DM | Open SDR partner program menu |
/help | DM / Group | Command reference |
Telegram WebApp
The bot includes a Mini App (WebApp) accessible via the "Кабинет" button. It provides URL checking, history, plan management, SDR dashboard, and bot settings — all within Telegram.
Discord Bot Integration
Add to Server
- Invite the bot via the OAuth2 link (contact sales for the invite URL)
- Grant required permissions: Manage Messages, Read Message History, Send Messages
- Enable
MESSAGE_CONTENTintent for auto-scanning - The bot auto-scans all messages in all channels for malicious URLs
Slash Commands
| Command | Description |
|---|---|
/check url:<URL> | Check a URL, returns embed with verdict |
/status | Bot protection status |
/settings | View/change server settings |
/stats | Server scan statistics |
/policy | View policy profile |
/allowlist add domain:<d> | Add to allow-list |
/denylist add domain:<d> | Add to deny-list |
/help | All commands |
REST API Integration
For custom applications, chatbots, CRM systems, or internal tools.
Authentication
Two methods:
- JWT token — obtained via Telegram auth endpoints
- API key — created in Web Admin, passed as
Authorization: Bearer <api_key>
Python Example
import requests
API = "https://api.securilayer.dev"
TOKEN = "your_jwt_or_api_key"
resp = requests.post(f"{API}/v1/decision/url", json={
"url": "https://suspicious-link.xyz/login",
"platform": "api",
}, headers={"Authorization": f"Bearer {TOKEN}"})
data = resp.json()
if data["verdict"] == "block":
print(f"BLOCKED: {data['reasons']}")
elif data["verdict"] == "warn":
print(f"WARNING: {data['reasons']}")
JavaScript/Node.js Example
const resp = await fetch('https://api.securilayer.dev/v1/decision/url', {
method: 'POST',
headers: {
'Authorization': `Bearer ${TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ url: 'https://suspicious.example', platform: 'api' }),
});
const { verdict, reasons, confidence } = await resp.json();
console.log(`${verdict}: ${reasons.join(', ')} (${Math.round(confidence*100)}%)`);
SIEM / SOAR Integration
For Teams and Company plans:
- Webhooks: Configure a webhook URL in Web Admin. Events are sent with HMAC-SHA256 signature and replay protection via timestamp.
- Syslog/JSON export:
GET /v1/export/siemreturns events in CEF or JSON format for ingestion into Splunk, ELK, QRadar, etc. - Pull mode: Poll
/v1/decisions?limit=100&offset=0on a schedule for batch processing.
Webhook Setup
POST /v1/webhooks
{
"url": "https://your-siem.example/webhook",
"events": ["decision.created", "policy.changed", "approval.completed"],
"secret": "your_hmac_secret"
}
Best Practices
- Use
/v1/decision/cache/lookupbefore full checks to avoid duplicate scans - Implement exponential backoff on 429 responses
- Store Decision Contract IDs for audit trail linkage
- Rotate API keys every 90 days via the Web Admin
- Enable 4-eyes approvals for production policy changes