Base URL: api.qweli.maveriqinsure.com

Qweli API Reference

REST API for evidence capture, fraud detection, and claims intelligence. All endpoints return JSON. Built for East African insurers, TPAs, and claims teams.

https://api.qweli.maveriqinsure.com

Overview

The Qweli API is organized around REST. It uses standard HTTP verbs, returns JSON, and uses API keys for authentication.

Content-Type: All request bodies must be application/json. All responses are application/json.
Idempotency: POST requests that create resources accept an Idempotency-Key header. Submitting the same key twice returns the original response without creating a duplicate.

Authentication

All API requests require an API key passed in the x-api-key header.

curl
Node.js
Python
curl https://api.qweli.maveriqinsure.com/v1/usage \ -H "x-api-key: YOUR_API_KEY"
const res = await fetch('https://api.qweli.maveriqinsure.com/v1/usage', { headers: { 'x-api-key': process.env.QWELI_API_KEY } });
import requests res = requests.get( 'https://api.qweli.maveriqinsure.com/v1/usage', headers={'x-api-key': os.environ['QWELI_API_KEY']} )
Keep your API key secret. Never expose it in client-side code or public repositories. Rotate it from the Settings page if compromised.

Sandbox credentials

Use these credentials to test the API. Sandbox data is real โ€” it runs against the live pilot environment.

Tenant 1 โ€” Motor
qweli-demo-savannah-motor-2026
Savannah Motor Assurance Ltd
Tenant 2 โ€” Health TPA
qweli-demo-apollo-health-2026
Apollo Health TPA
Cross-insurer testing: Submit the same evidence hash from both tenants to trigger a duplicate flag โ€” demonstrating Qweli Match across insurer boundaries.

Errors

Qweli uses standard HTTP status codes. Error responses include a machine-readable error field.

CodeMeaning
200Success
201Resource created
400Bad request โ€” check your request body
401Unauthorized โ€” invalid or missing API key
404Not found โ€” resource doesn't exist or belongs to another tenant
409Conflict โ€” object not yet in storage, retry confirm
500Server error โ€” contact support

Evidence capture

The core Qweli flow: register evidence metadata โ†’ upload file to object storage โ†’ confirm. The two-step upload ensures the cryptographic hash is committed before the file bytes arrive.

POST /v1/captures Register evidence, get presigned upload URL ๐Ÿ”‘ API key โ–ผ

Registers evidence metadata and returns a presigned S3 URL for uploading the file directly to object storage. The SHA-256 hash is committed at this point โ€” any file uploaded to the URL is verified against it.

Headers
NameTypeRequiredDescription
x-api-keystringrequiredYour tenant API key
Idempotency-KeystringoptionalUnique key to prevent duplicate submissions
Body
FieldTypeRequiredDescription
incidentTypeenumrequiredMOTOR_ACCIDENT ยท MOTOR_THEFT ยท PROPERTY_DAMAGE ยท MEDICAL_ADMISSION ยท OTHER
latitudenumberrequiredGPS latitude at capture time
longitudenumberrequiredGPS longitude at capture time
mediaHashstringrequiredSHA-256 hex digest of the media file (64 chars)
mimeTypestringrequiredimage/jpeg ยท image/png ยท video/mp4
captureTimestampISO 8601requiredWhen the evidence was captured on-device
capturedLatitudenumberrequiredGPS lat at the moment of capture (may differ from incident)
capturedLongitudenumberrequiredGPS lng at the moment of capture
fileSizeBytesintegerrequiredFile size in bytes
policyNumberstringoptionalPolicy number to link this evidence to
descriptionstringoptionalFree-text incident description
201Evidence registered
{ "incidentId": "04213caf-17f0-4318-a103-4b8b9b5c5cc4", "evidenceId": "f3b6caf7-e961-4ffb-a47a-8a8571429dd5", "uploadUrl": "https://api.qweli.maveriqinsure.com/storage/...", "uploadStatus": "QUEUED_OFFLINE" }
๐Ÿงช Try it
POST /v1/captures/:id/confirm Confirm file upload completed ๐Ÿ”‘ API key โ–ผ

Called after the file PUT to the presigned URL succeeds. Verifies the object exists in storage, marks the evidence as UPLOADED, triggers the match pipeline, and computes the perceptual hash asynchronously.

๐Ÿงช Try it
GET /v1/evidence List uploaded evidence ๐Ÿ”‘ API key โ–ผ
Query parameters
ParamTypeDefaultDescription
limitinteger50Max results (1โ€“100)
offsetinteger0Pagination offset
๐Ÿงช Try it

Claims

Claims are automatically created when evidence is captured against a valid policy. Claims are auto-triaged by risk score.

GET /v1/claims List claims with triage status ๐Ÿ”‘ API key โ–ผ
๐Ÿงช Try it
GET /v1/claims/triage/summary Triage summary โ€” approved, flagged, under review counts ๐Ÿ”‘ API key โ–ผ
๐Ÿงช Try it

Qweli Match

Cross-insurer duplicate and near-duplicate detection. Hash-only โ€” raw evidence never leaves your systems. Only cryptographic fingerprints are shared.

POST /v1/match/check Check evidence against cross-insurer hash index ๐Ÿ”‘ API key โ–ผ
FieldTypeRequiredDescription
mediaHashstringrequiredSHA-256 hex digest to check
perceptualHashstringoptional16-char pHash hex for near-duplicate check
๐Ÿงช Try it โ€” use same hash from both tenants to trigger cross-insurer flag
GET /v1/match/stats Match network statistics ๐Ÿ”‘ API key โ–ผ
๐Ÿงช Try it

Analytics

Cross-incident fraud pattern detection. Runs across your entire claims history to surface patterns a single-claim view misses.

GET /v1/analytics/fraud Full fraud analytics summary ๐Ÿ”‘ API key โ–ผ
๐Ÿงช Try it
GET /v1/analytics/patterns Cross-incident fraud patterns only ๐Ÿ”‘ API key โ–ผ
๐Ÿงช Try it

Qweli Health

Pre-authorisation evidence for medical TPAs. Built on the same capture infrastructure as motor โ€” same API, different business logic.

POST /v1/health/preauth Submit a pre-authorisation request ๐Ÿ”‘ API key โ–ผ
FieldTypeRequiredDescription
evidenceIdUUIDrequiredEvidence record to link this pre-auth to
memberRefstringrequiredOpaque ref to member in your system
providerRefstringrequiredHospital/clinic reference
admissionTypeenumoptionalINPATIENT ยท OUTPATIENT ยท DAY_CASE ยท EMERGENCY (default: INPATIENT)
diagnosisCodestringoptionalICD-10 code
preauthAmountnumberoptionalRequested amount in KES
Velocity flagging: Members with โ‰ฅ 2 admissions in 30 days are automatically placed UNDER_REVIEW. The memberVelocityFlag field in the response signals this.
GET /v1/health/members/:memberRef/history Member admission history and velocity check ๐Ÿ”‘ API key โ–ผ
๐Ÿงช Try it

Authentication endpoints

Dashboard login. Returns a session token for use with x-session-token header.

POST /v1/auth/login Exchange credentials for session token ๐Ÿ”‘ API key โ–ผ
๐Ÿงช Try it
GET /v1/auth/session Validate session token x-session-token โ–ผ

Pass the x-session-token header with the token returned from /v1/auth/login. Returns the session payload or 401 if expired.

Webhooks

Receive real-time events when claims are triaged, evidence is flagged, or pre-auth decisions are made.

HMAC signing: Every delivery is signed with HMAC-SHA256 using your webhook secret. Verify the X-Qweli-Signature header before processing.
Subscribe
Verify signature
Event payload
curl -X POST https://api.qweli.maveriqinsure.com/v1/webhooks/subscribe \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://your-system.com/webhook", "events": ["claim.triaged", "evidence.flagged"], "secret": "your-hmac-secret" }'
// Node.js โ€” verify Qweli webhook signature const crypto = require('crypto'); function verifySignature(payload, signature, secret) { const expected = crypto .createHmac('sha256', secret) .update(payload) .digest('hex'); return crypto.timingSafeEqual( Buffer.from(signature), Buffer.from(expected) ); }
{ "event": "evidence.flagged", "timestamp": "2026-06-22T10:00:00Z", "data": { "tenantId": "0d8f2375-...", "evidenceId": "f3b6caf7-...", "flagType": "DUPLICATE_EVIDENCE", "crossTenant": true, "confidenceScore": 0.94 } }

Available events:

capture.uploaded evidence.flagged claim.triaged health.preauth.submitted health.preauth.decided

Qweli API v1.0 ยท MaveriQ Insurtech Ltd ยท Built in Nairobi ๐Ÿ‡ฐ๐Ÿ‡ช

Questions? api@maveriqinsure.com