API Reference

Base URL

https://api.syntaxvalid.com

All API requests should be made to this base URL with the /api/v1 prefix.

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Get your API key from your dashboard settings.

Endpoints

POST /api/v1/projects

Create a new project

{ "name": "my-project", "repo_url": "https://github.com/owner/repo" }
Response: { "id": "uuid", "name": "my-project", "created_at": "2024-01-01T00:00:00Z" }

POST /api/v1/projects/{id}/analyses

Create a new analysis

multipart/form-data: - diff: (file) diff.patch - branch: "main" - commit: "abc123"
Response: { "id": "uuid", "status": "running", "started_at": "2024-01-01T00:00:00Z" }

GET /api/v1/analyses/{id}

Get analysis status and results

Response: { "id": "uuid", "status": "completed", "trust_score": 85, "violations": [...], "finished_at": "2024-01-01T00:00:00Z" }

GET /api/v1/analyses/{id}/report.json

Get JSON report

Returns the full analysis report in JSON format.

GET /api/v1/analyses/{id}/report.sarif

Get SARIF report

Returns the analysis report in SARIF 2.1.0 format for integration with GitHub Security, Azure DevOps, and other tools.

GET /api/v1/analyses/{id}/report.md

Get Markdown report

Returns a human-readable Markdown report suitable for documentation or PR comments.

OpenAPI Specification

Full interactive API documentation is available at:

The OpenAPI specification includes all endpoints, request/response schemas, and example payloads.