Peleza — Trust built on data
🇰🇪 KYC
On this page

Maisha Number

Verify a Kenyan Maisha Number (new-generation national ID) via POST /api/v1/maisha-number. Available on production and sandbox (https://sandbox.peleza.com). Sandbox uses seeded test data only — sample ID: 1028845319. Required body: id_number (6–10 digits) and consent (must be true). Successful responses include demographics and serial_no when available. HTTP 200 and 404 (not found) are billable; validation 400 is not. Billing slug: maisha-number.

Loading sandbox test IDs…

Request

POST/api/v1/maisha-number
{{baseUrl}}/api/v1/maisha-number
HeaderTypeDescription
AuthorizationstringBearer YOUR_ACCESS_TOKEN from the OAuth client-credentials flow
Content-Typestringapplication/json

Body Parameters

ParameterTypeDescriptionRequired
id_numberstringMaisha Number to verify (numeric, 6–10 digits). Sandbox sample: 1028845319required
consentbooleanMust be true — confirms data-subject consent to perform this verificationrequired
customer_numberstringOptional reference for your own tracking (max 255 characters)optional

Sample request body

All verification APIs require consent: true in the JSON body.

Sample dataSample request body
{
  "id_number": "12345678",
  "consent": true
}

Response

200 OKSample dataExample response
{
  "success": true,
  "response_code": 200,
  "message": "Maisha Number Details Fetched Successfully",
  "data": {
    "first_name": "JAMES",
    "last_name": "KAMAU",
    "other_name": "OTIENO",
    "name": "JAMES OTIENO KAMAU",
    "gender": "Male",
    "dob": "1988-03-15",
    "citizenship": "Kenyan",
    "id_number": "1028845319",
    "serial_no": "2489156370",
    "valid": true
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Response Fields

FieldTypeDescription
successbooleanWhether the request succeeded
response_codenumberApplication response code (typically mirrors HTTP)
messagestringHuman-readable status message
dataobjectPayload for the verified resource
request_idstringUUID for support and audit trails
data.first_namestringGiven name(s)
data.last_namestringSurname
data.other_namestringOther / middle name
data.namestringFull display name
data.genderstringGender
data.dobstringDate of birth (YYYY-MM-DD)
data.citizenshipstringCitizenship
data.id_numberstringMaisha Number verified
data.serial_nostringID serial number when available
data.validbooleanWhether the Maisha Number record is valid

Error codes

Standard Peleza HTTP / response_code values (same across all API calls). Validation message text is endpoint-specific. Full reference: Error Codes.

CodeWhenBilled?
200Maisha Number details returned successfullyYes
400Validation — missing/invalid id_number (6–10 digits) or consent (must be true)No
401Missing or invalid Bearer tokenNo
402Insufficient wallet balance or credit limitNo
403No active wallet or billing profile (or service not enabled)No
404Maisha Number not foundYes
408Upstream timeout / service errorNo
429Rate limitedNo
502Upstream bad or unreadable responseNo
503Verification service unavailable or request timed outNo

400 — validation

400Sample data400 — validation
{
  "success": false,
  "response_code": 400,
  "message": "The ID number must be 6 to 10 digits",
  "errors": {
    "id_number": "The ID number must be 6 to 10 digits"
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440030"
}

404 — not found

404Sample data404 — not found
{
  "success": false,
  "response_code": 404,
  "message": "Maisha Number Not Found",
  "description": "There is no information for requested search parameters",
  "request_id": "550e8400-e29b-41d4-a716-446655440031"
}

Set {{baseUrl}} to https://api.peleza.com (production) or https://sandbox.peleza.com (sandbox). Authenticated calls need a Bearer token from POST /api/v1/oauth/token.