API Documentation
Integrate security scanning into your applications
API Keys
Manage your API keys for programmatic access
API Reference
Authentication
Add your API key to requests using the X-API-Key header:
X-API-Key: your_api_key_here
Start a Scan
POST /api/scan
curl -X POST \
https://api.codephantom.dev/api/scan \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "example.com"
}'
Get Scan Results
GET /api/reports/{scanId}
curl \
https://api.codephantom.dev/api/reports/scan_123 \
-H "X-API-Key: your_api_key"
Response Format
{
"scan": {
"id": "scan_123",
"url": "example.com",
"status": "complete",
"score": 85
},
"headers": [
{
"headerName": "Content-Security-Policy",
"headerValue": "default-src 'self'",
"status": "success"
}
],
"ssl": {
"valid": true,
"protocol": "TLSv1.3",
"expires": "2024-12-31T23:59:59.999Z"
},
"dns": {
"hasDMARC": true,
"hasSPF": true,
"status": "success"
}
}