Skip to content

API Overview

The nolapse Platform API is a JSON REST API that backs the dashboard, the CLI token commands, the badge CDN, and the executions feed. This page covers the base URL, authentication scheme, request/response format, and a complete endpoint index.


DeploymentBase URL
Self-hostedhttp://localhost:8080 (default dev port)
Cloud (planned)https://api.nolapse.dev

All endpoints are versioned under /v1/. The health check lives at the root with no version prefix.


Authenticated endpoints require a Bearer token in the Authorization header:

Authorization: Bearer nlp_<40-character-alphanumeric-string>

Tokens are created via the dashboard or via POST /v1/tokens. Every token carries one or more scopes that limit what it can do. The only scope currently defined is execute.

Unauthenticated requests to protected endpoints receive 401 Unauthorized.


  • All request bodies must be Content-Type: application/json.
  • All responses are Content-Type: application/json unless the endpoint explicitly returns another type (e.g. the badge endpoint returns image/svg+xml).
  • Timestamps are ISO 8601 UTC strings: "2026-03-18T09:00:00Z".
  • Error responses follow the shape {"error":"<message>"}.

All routes share:

MiddlewareBehaviour
CORSAccess-Control-Allow-Origin echoed only for origins in ALLOWED_ORIGINS env var (comma-separated). Unknown origins receive no CORS headers. Vary: Origin is always set.
Request IDX-Request-ID header injected on every response
LoggerStructured access log line per request

Self-hosted deployments must set ALLOWED_ORIGINS to the origin(s) of their dashboard and any other browser clients. See Deployment Configuration for details.


MethodPathAuthDescriptionStatus
GET/healthNoneLiveness check — returns {"status":"ok"}Live
POST/v1/sessions/createSERVICE_TOKENCreate a session (called by nolapse-web only)Live
DELETE/v1/sessions/{id}NoneDelete a session (logout)Live
POST/v1/auth/validateNone (token in body)Validate a token, return org and scopesLive
GET/v1/tokensSessionList tokens for the authenticated orgLive
POST/v1/tokensSessionCreate a new tokenLive
POST/v1/tokens/{id}/rotateSessionRotate a tokenLive
DELETE/v1/tokens/{id}SessionRevoke a tokenLive
PATCH/v1/tokens/{id}SessionUpdate token agent_typeLive
GET/v1/analyticsSession (paid plan)Analytics dataLive
GET/v1/badge/{org}/{repo}NoneReturn an SVG coverage badgePlanned — story #44
GET/v1/executionsNoneList execution records for a repoPlanned — story #47
POST/webhooks/stripeStripe-SignatureReceive Stripe webhook eventsLive
POST/webhooks/razorpayX-Razorpay-SignatureReceive Razorpay webhook eventsLive

Unimplemented endpoints return 501 Not Implemented. All session-protected endpoints return 401 when the Authorization: Bearer <session-token> header is absent or the session has expired.


The only fully live endpoint. No authentication required.

GET /health
{"status":"ok"}

Use this endpoint to verify the server is running before making other requests:

Terminal window
curl http://localhost:8080/health
# {"status":"ok"}

Rate limiting is planned. No limits are enforced today. The intended model is:

  • Free tier: 60 requests / minute per token
  • Team tier: 600 requests / minute per token
  • Enterprise tier: custom

429 Too Many Requests will be returned when limits are exceeded, with a Retry-After header.