API Reference v1

REST API, ready when you are.

Bearer-authenticated, tenant-scoped, idempotent on writes. All responses are JSON. Cursor pagination on lists.

v1.4.2 stable99.97% uptimeEdge-cached readsWebhook signaturesSOC2 in progress

Authentication

All requests require a Bearer token scoped to a tenant.

curl https://api.lexora.app/v1/applications \
  -H "Authorization: Bearer lex_live_••••••••" \
  -H "X-Tenant-Id: tn_harrowlaw"
  • TLS 1.3 required
  • Rate limit 600 req/min
  • Idempotency-Key on writes
  • Cursor pagination on lists

Applications

GET/v1/applications

List applications scoped to the requesting tenant.

Example response

{
  "data": [
    {
      "id": "app_01H…",
      "status": "lender_bidding",
      "amount_cad": 12500
    }
  ],
  "next_cursor": null
}
POST/v1/applications

Create a new financing application.

Body

{
  "client_id": "u_…",
  "case_type": "Impaired Driving",
  "amount_cad": 12500,
  "charge_summary": "…"
}

Example response

{
  "id": "app_01H…",
  "status": "submitted",
  "ai_score": null
}
GET/v1/applications/:id

Retrieve a single application.

Example response

{
  "id": "app_01H…",
  "risk_tier": "B",
  "ai_score": 82
}
PATCH/v1/applications/:id

Update mutable fields.

Body

{
  "amount_cad": 14000
}

Example response

{
  "ok": true
}
DELETE/v1/applications/:id

Soft-delete an application (admin only).

Example response

{
  "ok": true
}

Bids

GET/v1/applications/:id/bids

List bids on an application.

Example response

{
  "ok": true
}
POST/v1/applications/:id/bids

Place a bid (lender only).

Body

{
  "rate_bps": 1050,
  "term_months": 18,
  "notes": "…"
}

Example response

{
  "ok": true
}
POST/v1/bids/:id/accept

Accept a bid (firm only).

Example response

{
  "application": {
    "status": "awarded"
  },
  "loan": {
    "id": "loan_…"
  }
}
POST/v1/bids/:id/withdraw

Withdraw a bid (lender only).

Example response

{
  "ok": true
}

Loans

GET/v1/loans

List loans scoped to the requesting tenant.

Example response

{
  "ok": true
}
GET/v1/loans/:id/schedule

Amortization schedule.

Example response

{
  "ok": true
}
POST/v1/loans/:id/payments

Record a payment.

Body

{
  "amount_cad": 580,
  "method": "preauth"
}

Example response

{
  "ok": true
}

AI Layers

POST/v1/ai/intake

L01 — Conversational intake turn.

Body

{
  "session_id": "…",
  "message": "…"
}

Example response

{
  "ok": true
}
POST/v1/ai/classify

L02 — Classify charge into Criminal Code section.

Body

{
  "text": "…"
}

Example response

{
  "section": "320.14",
  "confidence": 0.94
}
POST/v1/ai/score

L04 — Risk score for an application.

Body

{
  "application_id": "app_…"
}

Example response

{
  "ai_score": 82,
  "risk_tier": "B"
}
POST/v1/ai/draft-retainer

L06 — Generate retainer draft from packet.

Example response

{
  "ok": true
}
POST/v1/ai/explain

L07 — Plain-language explanation of clauses.

Example response

{
  "ok": true
}

Admin

GET/v1/tenants

List tenants (admin only).

Example response

{
  "ok": true
}
POST/v1/tenants

Create a tenant.

Body

{
  "name": "Bay Street Defense",
  "type": "firm",
  "plan": "Scale"
}

Example response

{
  "ok": true
}
GET/v1/audit

Query the audit log.

Example response

{
  "ok": true
}
GET/v1/ai/health

Per-layer health, latency, and success rate.

Example response

{
  "ok": true
}

Webhooks

Subscribe to events; we deliver signed JSON with at-least-once semantics.

application.status_changedbid.createdbid.acceptedloan.disbursedloan.payment_receivedretainer.signedcompliance.flag_raisedaudit.event
{
  "id": "evt_01HX2K…",
  "type": "loan.disbursed",
  "created_at": "2026-06-25T14:01:22Z",
  "tenant_id": "tn_harrowlaw",
  "data": { "loan_id": "loan_01HX2…", "amount_cad": 12500 }
}