Lookup Number
Look up a single phone number and receive live HLR data: carrier, network type, MCC/MNC, portability, roaming, reachability, and billing cost.
Synchronous HLR
One request returns a complete enrichment payload — no polling or job ID required for single lookups.
Auto Normalization
Local and international inputs are normalized to E.164 with country metadata in the response.
Port & Roam Aware
Detect number portability and roaming so routing and fraud rules stay accurate.
Billable Clarity
Each success includes cost.amount and currency so you can reconcile spend per lookup.
Authentication
Authorization: Basic <token>. Auth guide →<400ms
95th percentile
$0.008
per successful lookup
50/s
per API key
30s
client recommendation
Endpoint
Base URL: https://api.sendexa.co
POST https://api.sendexa.co/v1/lookupContent-Type: application/jsonAuthorization: Basic YOUR_DASHBOARD_TOKEN
Request Body
{"msisdn": "0244123456","countryCode": "GH"}
| Field | Type | Required | Description |
|---|---|---|---|
| msisdn | string | required | Phone number in local or international format. Digits preferred; leading + is accepted. |
| countryCode | string | optional | ISO 3166-1 alpha-2 country (e.g. GH). Required for reliable national-format parsing. |
| reference | string | optional | Your correlation ID (max 64 chars). Echoed in the response when provided. |
Response
{"success": true,"code": "LOOKUP_OK","message": "Number lookup completed successfully.","requestId": "REQ-1782001122334","timestamp": "2026-07-12T10:15:22.104Z","data": {"lookupId": "LKP-9f3a2c1b-4e8d-4a71-b2c0-1d9e8f7a6b5c","msisdn": "0244123456","e164": "233244123456","country": "Ghana","countryCode": "GH","carrier": "MTN","networkType": "mobile","ported": false,"roaming": false,"reachable": true,"hlrStatus": "ACTIVE","mcc": "620","mnc": "01","cost": {"amount": 0.008,"currency": "USD"},"reference": null}}
Response Fields
High-level map of data. See the full field reference for enums and edge cases.
| Field | Type | Required | Description |
|---|---|---|---|
| lookupId | string | required | Unique ID for this lookup (LKP-…). Store for support and audits. |
| msisdn | string | required | Original number as submitted in the request. |
| e164 | string | required | Normalized international number (digits only, no +). |
| country | string | required | Human-readable country name (e.g. Ghana). |
| countryCode | string | required | ISO 3166-1 alpha-2 code (e.g. GH). |
| carrier | string | required | Current serving or home carrier name (e.g. MTN, Vodafone). |
| networkType | string | required | One of: mobile | fixed | voip | unknown. |
| ported | boolean | required | True if the number has been ported from its original network. |
| roaming | boolean | required | True if the subscriber is currently roaming. |
| reachable | boolean | required | True when the network reports the subscriber as reachable. |
| hlrStatus | string | required | ACTIVE | ABSENT | INACTIVE | INVALID | UNKNOWN. |
| mcc | string | required | Mobile Country Code (e.g. 620 for Ghana). |
| mnc | string | required | Mobile Network Code (e.g. 01 for MTN Ghana). |
| cost | object | required | { amount: number, currency: string } billed for this lookup. |
Code Examples
curl -X POST 'https://api.sendexa.co/v1/lookup' \-H 'Content-Type: application/json' \-H 'Authorization: Basic YOUR_DASHBOARD_TOKEN' \-d '{"msisdn": "0244123456","countryCode": "GH","reference": "signup-user-42"}'
HTTP Status Codes
| Code | Status | Description |
|---|---|---|
| 200 | OK | Lookup completed; data contains HLR results |
| 400 | Bad Request | Invalid msisdn, countryCode, or body schema |
| 401 | Unauthorized | Missing or invalid Basic Auth token |
| 403 | Forbidden | Insufficient credits or product not enabled |
| 422 | Unprocessable | Upstream HLR failure (LOOKUP_FAILED) |
| 429 | Too Many Requests | Rate limit exceeded (50 requests/second) |
| 500 | Server Error | Unexpected platform error — retry with backoff |
API Error Codes
| Code | HTTP | Cause |
|---|---|---|
INVALID_MSISDN | 400 | msisdn missing, empty, or unparseable |
INVALID_COUNTRY_CODE | 400 | countryCode not a valid ISO alpha-2 value |
UNAUTHORIZED | 401 | Bad or missing Authorization header |
INSUFFICIENT_CREDITS | 403 | Balance too low for this lookup |
LOOKUP_FAILED | 422 | HLR provider timeout or temporary failure |
RATE_LIMIT_EXCEEDED | 429 | Exceeded 50 requests per second |
Common Use Cases
Pre-OTP number check
Confirm reachable and networkType before sending a verification code.
Carrier selection
Use ported, mcc, and mnc to pick the correct SMS or voice route.
Signup risk filter
Block or step-up auth when networkType is voip or status is INVALID.
Billing note
reachable is false or hlrStatus is INACTIVE / ABSENT — those are valid network answers. Validation failures (HTTP 400) before HLR is invoked are not charged. Check cost on every 200 response.Best Practices
- Always pass
countryCodefor national-format numbers to avoid wrong-country normalization - Persist
lookupId,e164, andrequestIdwith the user or contact record - Treat
LOOKUP_FAILEDas retryable with exponential backoff (max 2–3 attempts) - For more than ~20 numbers, switch to bulk lookup
- Cache results briefly; re-lookup before high-value campaigns if data is older than a few days