API Reference

Pinelight provides a REST API for programmatic access to security scanning.

Authentication

All API requests require an API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Generate an API key in your Dashboard.

Endpoints

POST /api/scan

Scan code for vulnerabilities.

{ "code": "const x = userInput;", "language": "javascript", "filename": "example.js" }
{ "scanId": "uuid", "findings": [...] }

GET /api/health

Health check endpoint.

{ "status": "ok", "timestamp": "2024-01-01T00:00:00Z", "version": "1.0.0", "db": "connected" }

Rate Limits

Plan
Requests/Minute
Free
100
Pro
1000
Enterprise
Custom