Single Lookup
Resolve a single phone number hash to its verified phone number and carrier information.
/v1/lookupLook up a phone number by its SHA-256 hash. Returns the verified phone number in E.164 format along with carrier details.
Request Headers
Content-TypestringRequiredMust be application/json.
X-API-KeystringRequiredYour Decode Hash API key. Starts with sk_live_ or sk_test_.
Request Body
hashstringRequiredThe SHA-256 hash of the phone number to look up. Must be a valid 64-character hexadecimal string.
Response Body
phonestringThe resolved phone number in E.164 format (e.g., +254746604674).
carrierstringThe mobile carrier associated with this number (e.g., Safaricom, Airtel, Telkom).
lookup_time_msnumberTime taken to resolve the hash, in milliseconds.
curl -X POST https://api.decode.cowdi.co/v1/lookup \
-H "Content-Type: application/json" \
-H "X-API-Key: sk_live_xxx" \
-d '{
"hash": "9a880505fc5c7953ad6770d71055719bc9f00d963c815207a1a657402d5b7a54"
}'{
"phone": "+254746604674",
"carrier": "Safaricom",
"lookup_time_ms": 1.2
}Errors
This endpoint may return the following error responses:
401Invalid or missing API key.
402Monthly lookup quota exceeded. Upgrade your plan.
404The hash does not match any known phone number.
422Invalid hash format. Must be a 64-character hex string.
429Rate limit exceeded. See the Rate Limits page.
{
"error": {
"code": "hash_not_found",
"message": "The provided hash does not match any known phone number."
}
}