Skip to main content

GET /api/v1/decision-traces

List decision traces with offset-based pagination. Traces are only recorded when tracing is enabled in tenant settings and the request passes the sample rate check.

Query Parameters

ParameterTypeDefaultDescription
customerIdstringFilter traces for a specific customer
requestIdstringFilter by request/interaction ID
limitinteger50Max results (max 200)
offsetinteger0Pagination offset

Response

{
  "traces": [
    {
      "id": "trace_001",
      "customerId": "CUST001",
      "requestId": "550e8400-e29b-41d4-a716-446655440000",
      "decisionFlowKey": "default-flow",
      "pipeline": [
        { "stage": "qualification", "candidates": 47, "passed": 32, "durationMs": 12 },
        { "stage": "contact_policy", "candidates": 32, "passed": 28, "durationMs": 8 },
        { "stage": "scoring", "candidates": 28, "durationMs": 15 },
        { "stage": "ranking", "topScore": 0.872, "durationMs": 2 },
        { "stage": "arbitration", "method": "priority_weighted", "durationMs": 3 }
      ],
      "result": {
        "count": 5,
        "topOffer": { "offerId": "offer_001", "score": 0.872 }
      },
      "totalDurationMs": 42,
      "createdAt": "2026-03-16T14:30:00.000Z"
    }
  ],
  "total": 1250,
  "limit": 50,
  "offset": 0
}

GET /api/v1/decision-traces/

Get a single decision trace with full pipeline detail.

Response

Returns the complete trace object with all pipeline stages, scoring details, and result.

Enabling Decision Traces

Decision traces are controlled by two tenant settings:
SettingDescription
decisionTraceEnabledMaster toggle for trace recording
decisionTraceSampleRateSampling rate (0.0 - 1.0). Set to 1.0 to trace every request
Configure these via the Settings API or the platform UI under Settings.
At high traffic volumes, set the sample rate below 1.0 to avoid excessive storage. A 10% sample rate (0.1) typically provides sufficient forensic coverage.

Roles

EndpointAllowed Roles
GET /decision-tracesadmin, editor, viewer
GET /decision-traces/{id}admin, editor, viewer
See also: Dashboards | Decision Flows