Base URL
3001 by default. All endpoints are prefixed with /api.
Authentication
Most endpoints require a JWT bearer token:POST /api/auth/login(username/password)POST /api/auth/local/session(desktop auto-login)- GitHub OAuth flow
Auth Levels
| Level | Header | Description |
|---|---|---|
requireAuth | Authorization: Bearer <token> | Endpoint fails with 401 if no valid token |
optionalAuth | Optional | Endpoint works without auth but may return limited data |
| None | Not needed | Public endpoint |
Request Format
- Content-Type:
application/json - Method: GET, POST, PATCH, DELETE
- Body: JSON for POST/PATCH requests
Response Format
Success
Errors
| Status | Meaning |
|---|---|
| 400 | Validation error or bad request |
| 401 | Missing or invalid authentication |
| 403 | Forbidden (e.g., desktop-only endpoint) |
| 404 | Resource not found |
| 409 | Conflict (duplicate name, already exists) |
| 500 | Internal server error |
| 502 | External API failure (e.g., GitHub API) |

