API reference
API overview
A REST API over HTTPS that returns JSON. The same API powers the dashboard, so anything you can do in the product, you can automate.
Base URL
All endpoints are served under the /api prefix:
https://api.riscly.com/apiSelf-hosting / local
Running the API yourself? The base URL is whateverNEXT_PUBLIC_API_URL points to (defaults to http://localhost:4000), still with the /api prefix.Conventions
| Field | Type | Description |
|---|---|---|
Auth | header | Bearer token + x-org-id. See Authentication. |
Format | JSON | Request and response bodies are JSON. Send Content-Type: application/json. |
Methods | REST | GET to read, POST to create/act, PATCH to partially update, PUT to replace, DELETE to remove. |
Errors | HTTP | Non-2xx responses carry a message field. 401 = re-auth, 403 = role/plan, 404 = not found. |
Resources
The API is organized around these resources:
| Field | Type | Description |
|---|---|---|
Projects | /projects | Create, list, rename projects; files, commits, business context and the architecture overlay. |
Scans | /projects/{id}/scans | Start scans, list results, chat and predict over the latest scan. |
Code & fixes | /projects/{id}/code | Preview, commit or PR an AI fix; deep-scan source. |
Connections | /projects/{id}/connections | Connect, configure and disconnect providers; OAuth authorize URLs. |
Analysis | /analyze/* | Reliability, security, simulation, prediction over an architecture graph. |
Billing | /billing | Plan, usage, checkout and the customer portal. |