API REFERENCE

REST endpoints backed by Supabase Edge Functions. Tier determines fields returned. Historical conflict days are supported back to Day 1.

◆ API access is locked during launch

Full authentication details, copyable examples, and complete response payloads are shown to accounts with an active API key. There is nothing to buy yet: join founding access and we will email you when access opens.

Founding access — free while we launch →

1. Authentication

Authentication details are locked during launch.

Locked during launch —Join founding access — free → (unlocks: API authentication & keys)

2. Rate limits

  • All tiers: up to 100 requests/hour per API key (contact us for higher quotas).
  • Bulk or archival use: prefer daily exports / batch workflows where possible.

3. Endpoints

GET /api-nai

Query: day (optional) — conflict day; omit for latest. Optional country filter.

  • T0: expressed_score, delta; category may be hidden — see _tier_note.
  • T1+: + latent_score, gap_size, category.
  • T1+ (full War Posture feature): + velocity / velocity_delta on rows.
curl -s "https://qmaszkkyukgiludcakjg.supabase.co/functions/v1/api-nai?day=20" \
  -H "X-MENA-API-Key: YOUR_API_KEY"

Example JSON (T2-style)

{
  "conflictDay": 20,
  "tier": "professional",
  "total": 20,
  "data": [
    {
      "country_code": "IR",
      "expressed_score": 11,
      "latent_score": 39,
      "gap_size": 28,
      "category": "INVERSION",
      "delta": 3,
      "velocity": "up",
      "velocity_delta": 3
    }
  ]
}

GET /api-scenarios

Query: day (optional). history=true returns extra rows for T1+ with scenario history feature enabled.

Free tier receives conflictDay and tier with current: null; Informed and Professional receive the current object with A–E probabilities.

curl -s "https://qmaszkkyukgiludcakjg.supabase.co/functions/v1/api-scenarios?day=20" \
  -H "Authorization: Bearer YOUR_SUPABASE_JWT"
{
  "conflictDay": 226,
  "tier": "informed",
  "current": {
    "conflict_day": 226,
    "scenario_a": 12,
    "scenario_b": 60,
    "scenario_c": 6,
    "scenario_d": 22,
    "scenario_e": null,
    "scenario_b_range": {
      "low": 60,
      "high": 78,
      "note": "B = none of A, C or D. A, C and D can co-occur, so B is bounded: [100 - (A+C+D), 100 - max(A,C,D)]."
    },
    "updated_at": "2026-10-11T11:28:25.994526+00:00"
  },
  "history": [],
  "detectedScenarios": []
}

GET /api-country

Query: code (ISO-style country code, e.g. IR), day (optional).

  • T0: nai_score, nai_category; content_json is null with _tier_note.
  • T1: full content_json for Egypt / UAE (codes EGY, ARE, UAE in the registry).
  • T2: full reports for all countries in the dataset.
curl -s "https://qmaszkkyukgiludcakjg.supabase.co/functions/v1/api-country?code=IR&day=20" \
  -H "X-MENA-API-Key: YOUR_API_KEY"
{
  "conflictDay": 20,
  "tier": "professional",
  "data": {
    "country_code": "IR",
    "country_name": "Iran",
    "nai_score": 42,
    "nai_category": "INVERSION",
    "conflict_day": 20,
    "content_json": { "assessment": "...", "key_risks": [] },
    "updated_at": "2026-03-19T06:00:00Z"
  }
}

GET /api-disinfo

Query: day (optional). Row cap is tier-based (5 for free, larger cap for paid tiers); there is no separate limit query parameter in the current API.

curl -s "https://qmaszkkyukgiludcakjg.supabase.co/functions/v1/api-disinfo?day=20" \
  -H "Authorization: Bearer YOUR_SUPABASE_JWT"
{
  "tier": "informed",
  "conflictDay": 20,
  "total": 42,
  "data": [
    {
      "id": "…",
      "conflict_day": 20,
      "claim": "…",
      "status": "published",
      "verdict": "…",
      "source": "https://…",
      "created_at": "…"
    }
  ]
}

POST /api-dispute

Submit a dispute on a claim. Body (JSON): article_id, claim_text, source_url required; article_url optional.

curl -s -X POST "https://qmaszkkyukgiludcakjg.supabase.co/functions/v1/api-dispute" \
  -H "Content-Type: application/json" \
  -d '{"article_id":"uuid-here","claim_text":"...","source_url":"https://..."}'
{
  "success": true,
  "disputeId": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Dispute submitted successfully."
}

4. Historical data

Pass day=1 … day=N for any published conflict day. Rate limits apply the same for historical pulls.

5. Webhooks

Coming soon

Subscribe to pipeline completion events. Available in a future release. If this is a blocker for your use case, reach out via /contact.

API Reference · MENA Intel Desk