Developer documentation

Trust API reference

One REST surface, 15 verification modules, deterministic scoring with AI adjudication where judgment is required. Every resource lives under /api/v1, accepts and returns JSON, and is versioned by the api_version field.

Quickstart

Issue a key in the console (Organization → API keys), then call any module.

curl https://api.latrivex.com/api/v1/identity \
  -H "Authorization: Bearer ltx_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "full_name": "Amelia Nakamura",
    "date_of_birth": "1991-04-17",
    "country": "GB",
    "email": "amelia.nakamura@northwind.co.uk"
  }'
{
  "id": "8f1c...",
  "object": "verification",
  "api_version": "2026-07-01",
  "module": "identity",
  "decision": "approve",
  "risk_score": 12,
  "trust_score": 88,
  "confidence": 0.93,
  "signals": [ { "code": "email_domain_corporate", "weight": -4 } ],
  "latency_ms": 41,
  "request_id": "req_..."
}

Authentication

Send the key as a bearer token or in X-API-Key. Keys are hashed at rest, scoped (trust:read, trust:write, admin:read), bound to one organization and one environment (test or live), and revocable instantly. Write endpoints require trust:write.

Authorization: Bearer ltx_live_xxxxxxxxxxxxxxxxxxxx
X-Request-Id: 5f0d1c8a-...   # optional; echoed back for tracing

Rate limits & quotas

Two independent controls: a per-key requests-per-minute rate limit, and a monthly organization request quota set by the plan. Both are reported on every response.

X-RateLimit-Limit: 600
X-RateLimit-Remaining: 597
X-RateLimit-Reset: 42
X-Quota-Limit: 250000
X-Quota-Used: 18422

Exceeding the rate limit returns 429 with Retry-After; exhausting the monthly quota returns 402 until the plan is upgraded or the period rolls over.

Errors

HTTPCodeMeaning
401authentication_failedAPI key missing, malformed, revoked or expired.
403insufficient_scopeThe key does not carry the scope this endpoint requires.
404unknown_endpointNo Trust API resource at that path.
400invalid_json / invalid_requestBody is unparsable or fails module schema validation.
402quota_exceededMonthly organization quota exhausted. Upgrade the plan.
429rate_limit_exceededPer-key requests-per-minute limit hit. Honour Retry-After.
{
  "error": {
    "type": "latrivex_error",
    "code": "quota_exceeded",
    "message": "Monthly request quota of 250000 exhausted for this organization.",
    "details": { "used": 250000, "quota": 250000 }
  },
  "request_id": "req_..."
}

Endpoint reference

POST/api/v1/identityIdentity

Validates personal identity attributes for coherence and completeness.

Request body

{
  "full_name": "Amelia Nakamura",
  "date_of_birth": "1991-04-17",
  "country": "GB",
  "national_id": "QQ123456C",
  "email": "amelia.nakamura@northwind.co.uk",
  "phone": "+447700900123",
  "address_line": "18 Finsbury Circus, London"
}

cURL

curl https://api.latrivex.com/api/v1/identity \
  -H "Authorization: Bearer $LATRIVEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"full_name":"Amelia Nakamura","date_of_birth":"1991-04-17","country":"GB","national_id":"QQ123456C","email":"amelia.nakamura@northwind.co.uk","phone":"+447700900123","address_line":"18 Finsbury Circus, London"}'

Identity

  • POST /api/v1/identity
  • POST /api/v1/document
  • POST /api/v1/ocr
  • POST /api/v1/face-match
  • POST /api/v1/liveness

Signals

  • POST /api/v1/device
  • POST /api/v1/email
  • POST /api/v1/url

Web3

  • POST /api/v1/contracts
  • POST /api/v1/blockchain
  • POST /api/v1/wallet

Risk

  • POST /api/v1/ai
  • POST /api/v1/compliance
  • POST /api/v1/threat
  • POST /api/v1/trust

Webhooks

Register HTTPS endpoints per organization in the console. Deliveries are signed with the endpoint secret using HMAC-SHA256 over "<timestamp>.<raw body>".

  • verification.completed Emitted for every successful evaluation on any Trust API module.
  • verification.flagged Emitted when a verification returns a review decision.
  • verification.declined Emitted when a verification returns a decline decision.
  • quota.exceeded Emitted the first time a request is rejected for exhausting the monthly quota.
POST /your/endpoint
X-Latrivex-Event: verification.completed
X-Latrivex-Signature: t=1785000000,v1=8b1f...

{ "id": "evt_...", "type": "verification.completed",
  "created_at": "2026-07-27T10:00:00.000Z",
  "data": { "verification_id": "...", "module": "identity",
            "decision": "approve", "risk_score": 12 } }
// Node verification
const [t, v1] = header.split(",").map(p => p.split("=")[1]);
const expected = crypto.createHmac("sha256", secret)
  .update(`${t}.${rawBody}`).digest("hex");
const ok = crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected));

Plans

PlanPriceIncluded requestsRate limit
Sandbox$0.0010,00060 rpm
Startup$499.00250,000300 rpm
Growth$1,999.002,000,0001200 rpm
EnterpriseCustom25,000,0006000 rpm