Public BetaRisk models continue to evolve during validation.
Campaign API v2

Create the campaign once. Run every wallet cohort under the same audit trail.

API v2 is campaign-native: policy, analysis history, cluster investigations and Decision Packages remain attached to one campaign instead of creating a new project for every wallet upload.

Core workflow

Campaign → run catalog → analysis → cluster intelligence → decision package

Bearer API-key requests use the existing API subscription meter. Dashboard session calls use the same v2 routes without consuming API request quota; wallet-analysis credits are still enforced by the analysis billing gate.

Create campaign
Store campaign identity, chain, lifecycle, reward context, contracts and initial policy.
Run cohorts
Submit another wallet list without creating another campaign. JSON and multipart CSV are supported.
Discover history
Page persisted runs and select exact analysis IDs for decision retrieval or historical diff.
Inspect clusters
Read support confidence and forensic context without turning interpretation into a new risk decision.
Export decisions
Retrieve the latest campaign Decision Package as deterministic JSON or CSV.

Endpoint contract

POST/api/v2/campaigns

Create one durable campaign resource and freeze its initial risk-policy context.

GET/api/v2/campaigns

List campaigns, lifecycle state, current policy, and latest analysis run.

GET/api/v2/campaigns/{id}

Read one campaign with policy history and a bounded recent analysis-run preview.

PATCH/api/v2/campaigns/{id}

Move the campaign through transition-safe lifecycle states.

POST/api/v2/campaigns/{id}/policy

Activate a new versioned policy for future analysis runs with a required rationale.

GET/api/v2/campaigns/{id}/analyses

Page the complete persisted analysis-run catalog with an opaque cursor.

POST/api/v2/campaigns/{id}/analyses

Start another JSON or CSV wallet analysis under the same campaign.

GET/api/v2/campaigns/{id}/analyses/{analysisId}

Read status, decision totals, top wallet evidence, clusters, and graph context.

GET/api/v2/campaigns/{id}/analyses/{analysisId}/clusters/{clusterLabel}

Read ownership-scoped stored grouping, support confidence, inferred archetype and bounded forensic previews.

GET/api/v2/campaigns/{id}/decisions

Retrieve the latest campaign Decision Package as JSON or CSV.

1. Create campaign
Risk policy is campaign-level in v2 intake and cannot silently drift between runs.
curl -X POST https://triproofprotocol.com/api/v2/campaigns \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "name": "Genesis Rewards",
    "campaignType": "Points Program",
    "chain": "Base",
    "riskPolicy": "balanced",
    "startsAt": "2026-09-01T00:00:00Z",
    "endsAt": "2026-09-30T23:59:59Z",
    "rewardPoolUsd": 50000,
    "campaignContracts": [
      "0x1111111111111111111111111111111111111111"
    ]
  }'
2. Run JSON wallet cohort
The stored campaign chain is authoritative; clients do not choose a different chain per run.
curl -X POST https://triproofprotocol.com/api/v2/campaigns/CAMPAIGN_ID/analyses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "analysisMode": "onchain",
    "wallets": [
      "0x2222222222222222222222222222222222222222",
      {
        "walletAddress": "0x3333333333333333333333333333333333333333",
        "campaignPoints": 120,
        "campaignEventType": "claim"
      }
    ]
  }'
3. Or upload CSV
Multipart CSV uses the same canonical parser as the dashboard analysis pipeline.
curl -X POST https://triproofprotocol.com/api/v2/campaigns/CAMPAIGN_ID/analyses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "analysisMode=hybrid" \
  -F "csvFile=@campaign-wallets.csv"
4. List persisted runs
Discover older run IDs beyond the campaign detail preview without recomputing stored state.
curl "https://triproofprotocol.com/api/v2/campaigns/CAMPAIGN_ID/analyses?limit=100" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Continue with pagination.nextCursor to discover older persisted runs.
# The cursor is opaque and does not replace campaign authorization.
5. Poll exact run status
Returns Allow / Review / Exclude totals, evidence-aware wallet summaries and cluster links.
curl https://triproofprotocol.com/api/v2/campaigns/CAMPAIGN_ID/analyses/ANALYSIS_ID \
  -H "Authorization: Bearer YOUR_API_KEY"
6. Read Cluster Intelligence
Cluster Support Confidence is an explainable evidence-strength indicator for an already-stored grouping, not a Sybil probability or automatic action.
curl https://triproofprotocol.com/api/v2/campaigns/CAMPAIGN_ID/analyses/ANALYSIS_ID/clusters/CLUSTER_LABEL \
  -H "Authorization: Bearer YOUR_API_KEY"

# The response includes:
# - stored grouping basis
# - Cluster Support Confidence
# - inferred forensic archetype
# - bounded member / funding / graph / timeline previews
# It does not recompute membership, wallet risk, decisions or policy.
7. Change lifecycle
Lifecycle transitions are constrained; completed and archived campaigns cannot be silently reopened.
curl -X PATCH https://triproofprotocol.com/api/v2/campaigns/CAMPAIGN_ID \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{ "lifecycle": "paused" }'

# Allowed transitions are forward-safe.
# Example: completed -> active and archived -> active are rejected.
8. Activate a policy version
A rationale is required and the new version applies only to future campaign runs.
curl -X POST https://triproofprotocol.com/api/v2/campaigns/CAMPAIGN_ID/policy \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "preset": "strict",
    "rationale": "Increase protection before the final reward distribution."
  }'

# A new CampaignPolicy version is created.
# Stored decisions from earlier runs are not recomputed.
9. Retrieve Decision Package
The package reuses the same read-only customer decision semantics as the dashboard; API v2 does not recompute wallet decisions.
curl "https://triproofprotocol.com/api/v2/campaigns/CAMPAIGN_ID/decisions?format=json" \
  -H "Authorization: Bearer YOUR_API_KEY"

# CSV decision package:
curl "https://triproofprotocol.com/api/v2/campaigns/CAMPAIGN_ID/decisions?format=csv" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o decision-package.csv
Decision, run, cluster and policy boundaries
Analysis Run Catalog reads persisted run summaries and does not rerun analysis or reinterpret historical decisions. Cluster Support Confidence and inferred archetypes are read-only forensic interpretation and cannot change stored cluster membership, wallet risk, wallet decisions, reviewer state or campaign policy. A campaign run cannot silently change its stored policy preset. Policy activation creates a new CampaignPolicy version and never recomputes prior run decisions. Paused, completed, and archived campaigns reject new runs. Completed campaigns can only be archived, while archived campaigns cannot be reopened by Campaign Operations v1. Provider failures remain unresolved evidence/Gray Zone context rather than becoming malicious risk. Decision Package export is read-only.