Build with DecisionLedger

    A complete REST API for programmatic access to 150+ decision models, scenario management, KPI tracking, and governance workflows. Ship smarter integrations in hours, not weeks.

    # Create a scenario via the API
    curl -X POST \
    https://api.decisionledgerai.com/api/v1/scenarios \
    -H "Authorization: Bearer sk_live_..." \
    -H "Content-Type: application/json" \
    -d '{"model_id":"attrition_risk_model",'
    '"inputs":{"department":"Eng","tenure":24}}'
    # Response
    { "metrics": { "risk_score": 0.34, "band": "Medium" } }

    Quick Start

    Three steps from zero to your first API response.

    1

    Get Your API Key

    Generate a key from Admin → API Keys. Each key is scoped to your tenant with configurable permissions.

    2

    Make Your First Call

    POST to /api/v1/scenarios with a model_id and your inputs. The API validates, runs the model, and returns results in seconds.

    3

    Parse the Response

    The JSON response includes metrics, decision_structure, notes, and a full audit trail you can feed into downstream systems.

    API Categories

    Six resource families covering every aspect of the platform.

    Scenarios

    Create, run, and compare scenarios. Full CRUD plus batch operations for running multiple models in a single request.

    Models

    Browse 150+ decision models, retrieve input/output schemas, and validate inputs before execution.

    KPIs

    Define, track, and alert on key performance indicators. Link KPIs to model outputs for automated monitoring.

    Decisions

    Log decisions, attach evidence and scenarios, track outcomes over time, and generate audit exports.

    Integrations

    Configure HRIS and data warehouse connectors, trigger sync jobs, and manage field mappings programmatically.

    Webhooks

    Subscribe to platform events, configure delivery endpoints, set retry policies, and inspect delivery logs.

    Authentication

    Two options depending on your integration pattern.

    API Key

    Best for server-to-server integrations, cron jobs, and backend services. Generate keys in the Admin panel with configurable scopes and expiration dates.

    // Header Authorization: Bearer <your-api-key>

    Keys are scoped per-tenant with configurable read/write permissions per resource.

    OAuth 2.0

    Best for user-context flows where actions should be attributed to individual users. Supports authorization code and client credentials grants via Cognito.

    // Token exchange POST /oauth2/token grant_type=authorization_code code=<auth-code> redirect_uri=https://your-app.com/callback

    Access tokens are short-lived (1 hour). Use refresh tokens for long-running integrations.

    Code Examples

    Create a scenario in the language of your choice.

    Python
    import requests
    
    resp = requests.post(
        "https://api.decisionledgerai.com/api/v1/scenarios",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        json={
            "model_id": "attrition_risk_model",
            "inputs": {"department": "Engineering", "tenure_months": 24}
        }
    )
    print(resp.json()["metrics"])
    JavaScript
    const resp = await fetch(
      "https://api.decisionledgerai.com/api/v1/scenarios",
      {
        method: "POST",
        headers: {
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
        },
        body: JSON.stringify({
          model_id: "attrition_risk_model",
          inputs: { department: "Engineering", tenure_months: 24 }
        })
      }
    );
    const data = await resp.json();
    cURL
    curl -X POST https://api.decisionledgerai.com/api/v1/scenarios \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"model_id":"attrition_risk_model","inputs":{"department":"Engineering","tenure_months":24}}'

    Rate Limits

    Generous defaults that scale with your plan.

    Starter

    50 req/min

    1,000 req/day

    Ideal for prototyping and small teams

    Professional

    200 req/min

    10,000 req/day

    Production workloads and integrations

    Enterprise

    Custom limits

    Dedicated endpoints

    Volume-based, SLA-backed

    Ready to integrate?

    Get your API key and start building in minutes. Full documentation, SDKs, and example projects included.