National ID
Verify a Kenyan national ID via POST /api/v1/id/ke. Required body: id_number, consent (must be true), and scope — "basic" for demographics or "full" for the richer record plus photo / fingerprint / signature URLs when available. Billing: basic → national-id; full → national-id-image. HTTP 200 and 404 (ID not found) are billable; validation 400 is not. Error codes below are the same for all Peleza API calls — see Error Codes for the full reference.
Request
{{baseUrl}}/api/v1/id/keHeader
Body Parameters
scope=basic
Sample request body for scope=basic:
{
"id_number": "12345678",
"consent": true,
"scope": "basic"
}Sample response for scope=basic:
{
"success": true,
"response_code": 200,
"message": "Kenya ID details fetched successfully",
"country": "ke",
"data": {
"id_number": "12345678",
"serial_number": "237314661",
"first_name": "JOHN",
"last_name": "DOE",
"other_name": "SAMPLE",
"name": "DOE JOHN SAMPLE",
"gender": "Male",
"dob": "1990-01-01",
"citizenship": "Kenyan",
"valid": true
},
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}scope=full
Sample request body for scope=full:
{
"id_number": "12345678",
"consent": true,
"scope": "full"
}Sample response for scope=full:
{
"success": true,
"response_code": 200,
"message": "Kenya ID with full details fetched successfully",
"country": "ke",
"data": {
"full_name": "DOE JOHN SAMPLE",
"first_name": "JOHN",
"last_name": "DOE",
"other_name": "SAMPLE",
"id_number": "12345678",
"serial_number": "237314661",
"date_of_birth": "1990-01-01",
"gender": "Male",
"citizenship": "Kenyan",
"verification_status": "Valid",
"clan": "SAMPLE CLAN",
"ethnic_group": "SAMPLE ETHNIC GROUP",
"family": "SAMPLE FAMILY",
"occupation": "Engineer",
"pin": "A123456789Z",
"place_of_birth": "Nairobi, Kenya",
"place_of_death": null,
"place_of_live": "Nairobi, Kenya",
"reg_office": "Nairobi",
"date_of_death": null,
"date_of_issue": "2010-06-18",
"photo_url": "https://cdn.example.com/id_card_images/photo_xxx.jpeg",
"fingerprint_url": null,
"signature_url": "https://cdn.example.com/id_card_images/signature_xxx.jpeg",
"has_photo": true,
"has_fingerprint": false,
"has_signature": true,
"is_valid": true
},
"request_id": "550e8400-e29b-41d4-a716-446655440001"
}Response Fields
Error codes
Standard Peleza HTTP / response_code values (same across all API calls). Validation message text is endpoint-specific. Full reference: Error Codes.
400 — validation
{
"success": false,
"response_code": 400,
"message": "The scope field is required",
"country": "ke",
"errors": {
"scope": "The scope field is required"
},
"data": null,
"request_id": "550e8400-e29b-41d4-a716-446655440010"
}404 — ID not found
{
"success": false,
"response_code": 404,
"message": "Kenya ID not found",
"description": "There is no information for requested search parameters",
"country": "ke",
"data": null,
"request_id": "550e8400-e29b-41d4-a716-446655440013"
}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.
