API REFERENCE
Complete REST API for WarDek security and compliance scanning platform.
AUTHENTICATION
All API requests require authentication via a Bearer token in the Authorization header. API keys can be generated from your Dashboard under Settings.
Authorization: Bearer ssk_live_your_api_key_hereAPI keys start with
ssk_live_ for production and ssk_test_ for sandbox. Keep your keys secret and never commit them to version control.BASE URL
https://wardek.ioENDPOINTS
POST/api/v1/scanAUTH REQUIRED
Launch a scan
Start a new security scan on a target URL. Returns scan results with a security score.
Request Body
interface ScanRequest {
url: string;
ci?: {
minScore?: number;
maxCritical?: number;
maxHigh?: number;
};
}Response
interface ScanResponse {
schemaVersion: string;
id: string;
url: string;
domain: string;
status: string;
score: number;
grade: string;
duration: number;
findingSummary: FindingSummary;
criticalCount: number;
highCount: number;
reportUrl: string;
ci?: CiGateResult;
results: Record<string, object>;
recommendations: string[];
createdAt: string;
}Examples
cURL
curl -X POST https://wardek.io/api/v1/scan \
-H "Authorization: Bearer ssk_live_..." \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'TypeScript
const res = await fetch('https://wardek.io/api/v1/scan', {
method: 'POST',
headers: {
'Authorization': 'Bearer ssk_live_...',
'Content-Type': 'application/json',
},
body: JSON.stringify({ url: 'https://example.com' }),
});
const scan = await res.json();GET/api/v1/scansAUTH REQUIRED
List scans
Retrieve a paginated list of your scans, ordered by most recent first.
Response
interface ScanListResponse {
data: ScanSummary[];
pagination: {
total: number;
limit: number; // 1-100, default 10
offset: number; // default 0
hasMore: boolean;
};
}Examples
cURL
curl "https://wardek.io/api/v1/scans?limit=10&offset=0" \
-H "Authorization: Bearer ssk_live_..."TypeScript
const res = await fetch(
'https://wardek.io/api/v1/scans?limit=10&offset=0',
{ headers: { 'Authorization': 'Bearer ssk_live_...' } }
);
const { data, pagination } = await res.json();GET/api/v1/scans/:idAUTH REQUIRED
Get scan details
Retrieve full details for a specific scan, including all module results and findings.
Response
// Same structure as POST /api/v1/scan response
// with additional fields: auditTrail, proof, remediationExamples
cURL
curl https://wardek.io/api/v1/scans/scan_abc123 \
-H "Authorization: Bearer ssk_live_..."TypeScript
const res = await fetch(
'https://wardek.io/api/v1/scans/scan_abc123',
{ headers: { 'Authorization': 'Bearer ssk_live_...' } }
);
const scan = await res.json();GET/api/scans/:id/exportAUTH REQUIRED
Export scan results
Export scan results. Supported formats: json, yaml, csv, sarif. Append ?format=<format>.
Response
// JSON format: Full scan object
// YAML format: YAML-serialized scan object
// Content-Type varies by formatExamples
cURL
# JSON export
curl https://wardek.io/api/scans/scan_abc123/export?format=json \
-H "Authorization: Bearer ssk_live_..."
# YAML export
curl https://wardek.io/api/scans/scan_abc123/export?format=yaml \
-H "Authorization: Bearer ssk_live_..."TypeScript
const res = await fetch(
'https://wardek.io/api/scans/scan_abc123/export?format=json',
{ headers: { 'Authorization': 'Bearer ssk_live_...' } }
);
const data = await res.json();RATE LIMITS
Rate limits are applied per API key. Exceeding limits returns a 429 status with a Retry-After header.
ERROR CODES
Error Response Shape
{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"retryAfter": 60
}
}