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.
Overview
The Qweli API is organized around REST. It uses standard HTTP verbs, returns JSON, and uses API keys for authentication.
application/json. All responses are application/json.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.
Sandbox credentials
Use these credentials to test the API. Sandbox data is real โ it runs against the live pilot environment.
Errors
Qweli uses standard HTTP status codes. Error responses include a machine-readable error field.
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Resource created |
| 400 | Bad request โ check your request body |
| 401 | Unauthorized โ invalid or missing API key |
| 404 | Not found โ resource doesn't exist or belongs to another tenant |
| 409 | Conflict โ object not yet in storage, retry confirm |
| 500 | Server 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.
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.
| Name | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | required | Your tenant API key |
| Idempotency-Key | string | optional | Unique key to prevent duplicate submissions |
| Field | Type | Required | Description |
|---|---|---|---|
| incidentType | enum | required | MOTOR_ACCIDENT ยท MOTOR_THEFT ยท PROPERTY_DAMAGE ยท MEDICAL_ADMISSION ยท OTHER |
| latitude | number | required | GPS latitude at capture time |
| longitude | number | required | GPS longitude at capture time |
| mediaHash | string | required | SHA-256 hex digest of the media file (64 chars) |
| mimeType | string | required | image/jpeg ยท image/png ยท video/mp4 |
| captureTimestamp | ISO 8601 | required | When the evidence was captured on-device |
| capturedLatitude | number | required | GPS lat at the moment of capture (may differ from incident) |
| capturedLongitude | number | required | GPS lng at the moment of capture |
| fileSizeBytes | integer | required | File size in bytes |
| policyNumber | string | optional | Policy number to link this evidence to |
| description | string | optional | Free-text incident description |
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.
| Param | Type | Default | Description |
|---|---|---|---|
| limit | integer | 50 | Max results (1โ100) |
| offset | integer | 0 | Pagination offset |
Claims
Claims are automatically created when evidence is captured against a valid policy. Claims are auto-triaged by risk score.
Qweli Match
Cross-insurer duplicate and near-duplicate detection. Hash-only โ raw evidence never leaves your systems. Only cryptographic fingerprints are shared.
| Field | Type | Required | Description |
|---|---|---|---|
| mediaHash | string | required | SHA-256 hex digest to check |
| perceptualHash | string | optional | 16-char pHash hex for near-duplicate check |
Analytics
Cross-incident fraud pattern detection. Runs across your entire claims history to surface patterns a single-claim view misses.
Qweli Health
Pre-authorisation evidence for medical TPAs. Built on the same capture infrastructure as motor โ same API, different business logic.
| Field | Type | Required | Description |
|---|---|---|---|
| evidenceId | UUID | required | Evidence record to link this pre-auth to |
| memberRef | string | required | Opaque ref to member in your system |
| providerRef | string | required | Hospital/clinic reference |
| admissionType | enum | optional | INPATIENT ยท OUTPATIENT ยท DAY_CASE ยท EMERGENCY (default: INPATIENT) |
| diagnosisCode | string | optional | ICD-10 code |
| preauthAmount | number | optional | Requested amount in KES |
memberVelocityFlag field in the response signals this.Authentication endpoints
Dashboard login. Returns a session token for use with x-session-token header.
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-SHA256 using your webhook secret. Verify the X-Qweli-Signature header before processing.Available events:
Qweli API v1.0 ยท MaveriQ Insurtech Ltd ยท Built in Nairobi ๐ฐ๐ช
Questions? api@maveriqinsure.com