Phone numbers
Safaricom mobile number checks: who a number is registered to, recent SIM swaps and how long a number has been on the network. Numbers on other networks can't be checked.
Phone number ownership (Safaricom)
Checks with Safaricom whether a Safaricom mobile number is registered to the holder of the given ID. Safaricom answers only yes or no (matched); no subscriber details are returned. Numbers on other networks, or ported away from Safaricom, can't be checked.
Price: set by your bundle; one charge per call. "Not found" answers (result.found: false) are charged. Source failures return 502 and are refunded.
Try it: press Test on the request panel, choose ApiKey under Authentication and paste your test key (kept for this browser session). Use Example loads a scenario for each outcome. Test keys return sandbox sample data, free.
Headers
Idempotency-KeyMakes retries safe: a repeat with the same key and body returns the original verification without charging again. Up to 255 characters.
Phone number ownership (Safaricom) › Request Body
phoneNumberSafaricom mobile number, in any common form: 0712345678, 254712345678 or +254 712 345 678.
idNumber^[A-Z0-9]{4,20}$ · requiredThe ID the number should be registered to.
idTypeKind of document idNumber belongs to.
Phone number ownership (Safaricom) › Responses
Verification completed; see result.
idUnique id; use it to fetch the verification again.
apiThe verification API that was called, e.g. identity.national-id.
statusCOMPLETED includes "not found" answers; FAILED means the source failed and the charge was refunded.
environmentTEST for test keys (sandbox data), LIVE for live keys.
The answer, specific to each API (see its examples). Always has found: false when the source holds no record.
errorSet when status is FAILED.
costAmount charged in KES, as a decimal string. "0" for test keys and failed verifications.
createdAtlatencyMsTime the source took to answer, in milliseconds.
completedAtLast SIM swap (Safaricom)
When the SIM behind a Safaricom number was last swapped. Safaricom only looks back about three months: lastSwapDate is null when there was no swap in that window. daysSinceSwap helps flag recent swaps, a common sign of account takeover.
Price: set by your bundle; one charge per call. "Not found" answers (result.found: false) are charged. Source failures return 502 and are refunded.
Try it: press Test on the request panel, choose ApiKey under Authentication and paste your test key (kept for this browser session). Use Example loads a scenario for each outcome. Test keys return sandbox sample data, free.
Headers
Idempotency-KeyMakes retries safe: a repeat with the same key and body returns the original verification without charging again. Up to 255 characters.
Last SIM swap (Safaricom) › Request Body
phoneNumberSafaricom mobile number, in any common form: 0712345678, 254712345678 or +254 712 345 678.
Last SIM swap (Safaricom) › Responses
Verification completed; see result.
idUnique id; use it to fetch the verification again.
apiThe verification API that was called, e.g. identity.national-id.
statusCOMPLETED includes "not found" answers; FAILED means the source failed and the charge was refunded.
environmentTEST for test keys (sandbox data), LIVE for live keys.
The answer, specific to each API (see its examples). Always has found: false when the source holds no record.
errorSet when status is FAILED.
costAmount charged in KES, as a decimal string. "0" for test keys and failed verifications.
createdAtlatencyMsTime the source took to answer, in milliseconds.
completedAtAge on network (Safaricom)
When a Safaricom number was registered on the network. Safaricom only looks back so far: registeredOn is null (olderThanLookback: true) for numbers registered before that. A very new number is a common fraud signal.
Price: set by your bundle; one charge per call. "Not found" answers (result.found: false) are charged. Source failures return 502 and are refunded.
Try it: press Test on the request panel, choose ApiKey under Authentication and paste your test key (kept for this browser session). Use Example loads a scenario for each outcome. Test keys return sandbox sample data, free.
Headers
Idempotency-KeyMakes retries safe: a repeat with the same key and body returns the original verification without charging again. Up to 255 characters.
Age on network (Safaricom) › Request Body
phoneNumberSafaricom mobile number, in any common form: 0712345678, 254712345678 or +254 712 345 678.
Age on network (Safaricom) › Responses
Verification completed; see result.
idUnique id; use it to fetch the verification again.
apiThe verification API that was called, e.g. identity.national-id.
statusCOMPLETED includes "not found" answers; FAILED means the source failed and the charge was refunded.
environmentTEST for test keys (sandbox data), LIVE for live keys.
The answer, specific to each API (see its examples). Always has found: false when the source holds no record.
errorSet when status is FAILED.
costAmount charged in KES, as a decimal string. "0" for test keys and failed verifications.
createdAtlatencyMsTime the source took to answer, in milliseconds.
completedAt