Documentation
API Overview
PolyLever exposes a REST API consumed by the web dashboard. All authenticated routes require a Bearer token from login or OAuth.
Authentication
Pass the access token in the Authorization header: Authorization: Bearer <token>
| Method | Path | Auth | Purpose |
|---|---|---|---|
| POST | /api/v1/auth/register | None | Create an account with email and password |
| POST | /api/v1/auth/login | None | Sign in and receive an access token |
| GET | /api/v1/auth/google | None | Start Google OAuth sign-in |
| GET | /api/v1/auth/github | None | Start GitHub OAuth sign-in |
| POST | /api/v1/auth/verify-email | None | Verify email with token from link |
| POST | /api/v1/auth/resend-verification | None | Resend verification email |
GitHub integration
| Method | Path | Auth | Purpose |
|---|---|---|---|
| GET | /github/install-url | Bearer | Get GitHub App install URL |
| GET | /github/status | Bearer | List installations and connected projects |
| POST | /github/sync | Bearer | Re-sync repositories from GitHub |
| POST | /github/link-installation | Bearer | Manually link an installation ID |
| GET | /github/callback | Bearer or state | Complete GitHub App install callback |
| POST | /github/webhook | GitHub signature | Receive GitHub webhook events |
Reviews
| Method | Path | Auth | Purpose |
|---|---|---|---|
| GET | /reviews | Bearer | List all reviews for the signed-in user |
| GET | /reviews/{review_id} | Bearer | Get review detail with diff and AI text |
| GET | /projects/{project_id}/reviews | Bearer | List reviews for a specific project |
Review detail responses include diff_content, review_text, status, branch, commit SHAs, and LLM provider metadata.
Health check
| Method | Path | Auth | Purpose |
|---|---|---|---|
| GET | /health | None | Backend health check |