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/api

Self-hosting / local

Running the API yourself? The base URL is whatever NEXT_PUBLIC_API_URL points to (defaults to http://localhost:4000), still with the /api prefix.

Conventions

FieldTypeDescription
AuthheaderBearer token + x-org-id. See Authentication.
FormatJSONRequest and response bodies are JSON. Send Content-Type: application/json.
MethodsRESTGET to read, POST to create/act, PATCH to partially update, PUT to replace, DELETE to remove.
ErrorsHTTPNon-2xx responses carry a message field. 401 = re-auth, 403 = role/plan, 404 = not found.

Resources

The API is organized around these resources:

FieldTypeDescription
Projects/projectsCreate, list, rename projects; files, commits, business context and the architecture overlay.
Scans/projects/{id}/scansStart scans, list results, chat and predict over the latest scan.
Code & fixes/projects/{id}/codePreview, commit or PR an AI fix; deep-scan source.
Connections/projects/{id}/connectionsConnect, configure and disconnect providers; OAuth authorize URLs.
Analysis/analyze/*Reliability, security, simulation, prediction over an architecture graph.
Billing/billingPlan, usage, checkout and the customer portal.