API Documentation
Skannr REST API v1
Base URL
https://api.skannr.app/api/v1/Authentication
All endpoints (except login and register) require a bearer token in the Authorization header:
Authorization: Bearer <token>Tokens are obtained via the login endpoint and can be refreshed using the refresh endpoint. Access tokens expire after 15 minutes; refresh tokens expire after 7 days.
Authentication
/auth/loginAuthenticate with email and password. Returns access and refresh tokens.
/auth/registerCreate a new account with name, email, and password.
/auth/token/refreshExchange a refresh token for a new access token.
/auth/mfa/setupGenerate a TOTP secret and QR code for MFA setup.
/auth/mfa/enableEnable MFA by verifying a TOTP code.
/auth/mfaDisable MFA (requires password confirmation).
Targets
/targetsList all scan targets for the authenticated user.
/targetsAdd a new target (IP, domain, or CIDR range).
/targets/:idGet details for a specific target.
/targets/:idUpdate target configuration (label, scan profile, interval).
/targets/:idDelete a target and its associated data.
Scans
/scansList all scans across all targets.
/scans/:idGet scan details including status and progress.
/scans/:id/resultsGet port scan results for a completed scan.
/scans/:id/summaryGet per-host summary of open, filtered, and closed ports.
/targets/:id/scanTrigger an on-demand scan for a specific target.
/scans/trigger-allTrigger scans for all enabled targets.
Alerts
/alertsList all alerts (new ports, closed ports, TLS changes).
/alerts/:id/acknowledgeAcknowledge an alert.
/alerts/:id/resolveMark an alert as resolved.
Billing
/billing/statusGet current subscription status and plan details.
/billing/checkoutCreate a Stripe Checkout session for a new subscription.
/billing/portalGenerate a Stripe Customer Portal link for managing billing.
/billing/change-planUpgrade or downgrade the current subscription plan.
Score & Achievements
/scoreGet the security score with level, XP, and category breakdown.
/streakGet current and best scan streak data.
/achievementsList all achievements with earned status and timestamps.
Rate Limits
API requests are rate-limited per account based on your subscription plan. Rate limit headers are included in every response:
X-RateLimit-Limit— maximum requests per window.X-RateLimit-Remaining— requests remaining in the current window.X-RateLimit-Reset— Unix timestamp when the window resets.
Errors
All errors return a JSON object with a message field. HTTP status codes follow standard conventions: 400 for bad requests, 401 for unauthorized, 403 for forbidden, 404 for not found, and 429 for rate-limited.