DocumentationAPI Reference
Api

API Overview

High-level overview of OutRiskAI APIs, architecture, authentication mechanisms, and integration routes

OutRiskAI provides programmatic REST APIs designed for both web dashboard interaction and external system integrations.

Looking to integrate OutRiskAI into your CRM or backend pipeline? Jump straight to our Public API Guide or explore the interactive OpenAPI Reference.

API Categories

API TypePath PrefixAuthenticationTarget Audience
Public REST API/api/public/v1Bearer Token (API Key)External services, CRMs, mobile apps, CI/CD pipelines
Dashboard API/api/v1NextAuth Cookie / SessionOutRiskAI Web Application
OpenAPI Spec/api/public/v1/openapiUnauthenticatedAPI client generators, Postman, Fumadocs OpenAPI

Base URLs

Public API (Integrations)

Development:  http://localhost:3000/api/public/v1
Production:   https://your-domain.com/api/public/v1

Dashboard API (Internal Web App)

Development:  http://localhost:3000/api/v1
Production:   https://your-domain.com/api/v1

Authentication Mechanisms

1. API Keys (Public API)

API keys are created from your Profile page under API Credentials (/profile).

Authorization: Bearer ork_live_your_secret_key
  • Keys support fine-grained scopes (documents:read, documents:write).
  • Shared across server instances with rate limiting enforced per key.

2. Session Cookies (Dashboard API)

Requests from the OutRiskAI web app authenticate automatically using HTTP-only encrypted session cookies created via NextAuth.js.

Key Endpoint Summary

Public REST Endpoints (/api/public/v1)

MethodEndpointDescriptionScope
GET/healthSystem health and API version checkUnauthenticated
GET/accountRead account metadata for authenticated keydocuments:read
GET/documentsList uploaded contracts with paginationdocuments:read
POST/documentsRegister contract URL or upload contract filedocuments:write
GET/documents/{id}Read metadata for a single contractdocuments:read
DELETE/documents/{id}Permanently delete contract and analysisdocuments:write
GET/documents/{id}/statusPoll asynchronous AI analysis lifecycledocuments:read
GET/documents/{id}/analysisFetch extracted contract risks & solutionsdocuments:read

Response Architecture

All public routes return a uniform JSON envelope structure:

{
  "success": true,
  "data": { ... },
  "error": null,
  "meta": {
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 42
    }
  }
}

Rate Limiting & Quotas

  • Public API Quota: 100 requests per 15 minutes per API key.
  • Headers Included: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.
  • Exceeded Limit: Returns status 429 Too Many Requests with a Retry-After header.

Next Steps

On this page