All API endpoints are served under http://localhost:3000 (default).
Authentication: Unless noted otherwise, all endpoints require a valid JWT in the
auth_tokenHTTP-only cookie (set byPOST /api/auth/login).
| Method | Path | Auth | Description |
|---|---|---|---|
GET |
/health |
No | Returns { status: "ok" } |
| Method | Path | Auth | Description |
|---|---|---|---|
POST |
/api/auth/register |
No | Register a new user |
POST |
/api/auth/login |
No | Authenticate and receive JWT cookie |
POST |
/api/auth/logout |
No | Clear the auth cookie |
GET |
/api/auth/me |
Yes | Get current user profile |
PUT |
/api/auth/me |
Yes | Update current user (name, password) |
Body: { "name": "string", "email": "string", "password": "string" }
- Password: 8+ chars, uppercase, lowercase, numbers.
- First user becomes
admin; subsequent users getviewerrole. - Returns
201with user object.
Body: { "email": "string", "password": "string" }
- Sets
auth_tokenHTTP-only cookie (24h expiry). - Returns
200with{ message, user }.
Body: { "name"?: "string", "password"?: "string", "currentPassword"?: "string" }
currentPasswordrequired when changing password.
| Method | Path | Auth | Description |
|---|---|---|---|
POST |
/api/evidence/upload |
Yes | Upload a file for processing |
Content-Type: multipart/form-data
file(required): The evidence file.workspaceId(optional): Workspace to associate with.processName(optional): Custom process name.- Provider/model from app settings are used automatically.
- Returns
202 Acceptedwith{ evidenceId, jobId, statusUrl }.
| Method | Path | Auth | Description |
|---|---|---|---|
GET |
/api/jobs |
Yes | List jobs (filtered by workspace or user) |
GET |
/api/jobs/:id |
Yes | Get a specific job with artifacts |
PUT |
/api/jobs/:id |
Yes | Update job (e.g. process name) |
DELETE |
/api/jobs/:id |
Yes | Delete job, evidence, and artifacts |
Query: ?workspaceId=<id> (optional)
- Returns jobs for the current user, optionally filtered by workspace.
- Returns job data with associated artifacts array.
Body: { "processName": "string" }
- Updates the job's
process_namefield.
- Cascading delete: removes the job, associated evidence files, and all artifacts.
| Method | Path | Auth | Description |
|---|---|---|---|
GET |
/api/artifacts/:id/content |
Yes | Download/view artifact content |
PUT |
/api/artifacts/:id/content |
Yes | Update artifact content |
Query: ?view=true (optional) — omit Content-Disposition header for inline viewing.
- Returns artifact content with appropriate MIME type (
text/xml,application/json,text/markdown,text/plain).
Body: { "content": "string | object" }
- Objects are JSON-stringified before storage.
| Method | Path | Auth | Description |
|---|---|---|---|
GET |
/api/workspaces |
Yes | List current user's workspaces |
POST |
/api/workspaces |
Yes | Create a new workspace |
DELETE |
/api/workspaces/:id |
Yes | Delete a workspace (Owner only) |
GET |
/api/workspaces/:id/members |
Yes | Get workspace members |
PUT |
/api/workspaces/:id/members/:userId |
Yes | Update member role |
DELETE |
/api/workspaces/:id/members/:userId |
Yes | Remove member |
POST |
/api/workspaces/:id/invite |
Yes | Invite user |
GET |
/api/workspaces/:id/invitations |
Yes | List pending invitations |
DELETE |
/api/workspaces/:id/invitations/:inviteId |
Yes | Revoke invitation |
Body: { "name": "string" }
- Returns
201with workspace object.
- Deletes a workspace and all its contents.
- Note: Only the workspace owner can delete it.
- Returns a list of members in the workspace with their roles.
Body: { "role": "viewer" | "editor" }
- Updates a member's role.
- Note: Only the workspace owner can manage roles.
- Removes a member from the workspace.
Body: { "email": "string", "role": "viewer" | "editor" }
- Invites a user to the workspace.
- Returns
200with the invitation object.
- Returns a list of pending invitations for the workspace.
- Revokes a pending invitation.
| Method | Path | Auth | Description |
|---|---|---|---|
GET |
/api/settings |
Admin | Get all application settings |
PUT |
/api/settings/:key |
Admin | Create or update a setting |
DELETE |
/api/settings/:key |
Admin | Delete a setting |
POST |
/api/settings/verify-provider |
Admin | Verify LLM provider and list models |
Body: { "value": "string" }
- Known keys:
llm_provider,llm_model,llm_api_key,llm_base_url. llm_api_keyis encrypted before storage.
Body: { "provider": "string", "apiKey": "string", "baseURL"?: "string" }
- Tests the connection and returns
{ models: [...] }.
| Method | Path | Auth | Description |
|---|---|---|---|
GET |
/api/admin/users |
Admin | List all users (paginated) |
PATCH |
/api/admin/users/:id |
Admin | Update a user's role and/or status |
GET |
/api/admin/jobs |
Admin | List all jobs (paginated, all users) |
Query: ?page=1&limit=10
- Returns
{ users: [...], pagination: { page, limit, total, totalPages } }.
Body: { "role"?: "admin" | "editor" | "viewer", "status"?: "active" | "inactive" }
- Updates one or both fields.
- Cannot modify your own user.
Query: ?page=1&limit=20
- Returns
{ jobs: [...], pagination: { page, limit, total, totalPages } }. - Each job enriched with
user,workspace,artifacts,llm_provider,llm_model.
| Method | Path | Auth | Description |
|---|---|---|---|
GET |
/api/notifications |
Yes | List user's notifications |
PUT |
/api/notifications/:id/read |
Yes | Mark a notification as read |
PUT |
/api/notifications/read-all |
Yes | Mark all as read |
DELETE |
/api/notifications/:id |
Yes | Delete a notification |
- Returns an array of notifications for the authenticated user.
- Each notification includes
id,type,message,data,is_read,created_at.
| Method | Path | Auth | Description |
|---|---|---|---|
GET |
/api/invitations |
Yes | List user's pending invitations |
GET |
/api/invitations/:token |
No | Get invitation details by token |
POST |
/api/invitations/:token/accept |
Yes | Accept an invitation |
POST |
/api/invitations/:token/decline |
Yes | Decline an invitation |
- Adds the user to the workspace with the invited role.
- Returns
200with the updated invitation.
- Marks the invitation as declined.
- Returns
200with the updated invitation.
All endpoints return errors in the format:
{ "error": "Error message description" }Common HTTP status codes:
| Code | Meaning |
|---|---|
400 |
Bad request (missing/invalid parameters) |
401 |
Unauthorized (missing or invalid JWT) |
403 |
Forbidden (insufficient role) |
404 |
Resource not found |
409 |
Conflict (e.g. duplicate user) |
500 |
Internal server error |