sinch-number-lookup-api
Sinch Number Lookup API
Overview
Queries phone numbers for carrier, line type, porting, SIM swap, VoIP detection, and reassigned number detection. Used for fraud prevention, routing, and data enrichment. One number per request — no batch endpoint.
Agent Instructions
Before generating code, gather from the user: approach (SDK or direct API calls) and language (Node.js, Python, Java, .NET/C#, curl). Do not assume defaults.
When the user chooses SDK, refer to sinch-sdks for installation, client initialization, and language-specific references. Note: Number Lookup is only supported in Node.js and Python (partial) SDKs — for Java and .NET, use direct HTTP calls.
Getting Started
Authentication
See sinch-authentication for full setup.
Base URL
https://lookup.api.sinch.com
Endpoint: POST /v2/projects/{PROJECT_ID}/lookups
Store credentials in environment variables — never hardcode tokens or keys in commands or source code:
export SINCH_PROJECT_ID="your-project-id"
export SINCH_ACCESS_TOKEN="your-oauth-token"
First API Call
curl -X POST \
"https://lookup.api.sinch.com/v2/projects/$SINCH_PROJECT_ID/lookups" \
-H "Authorization: Bearer $SINCH_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"number": "+12025550134",
"features": ["LineType", "SimSwap", "VoIPDetection", "RND"],
"rndFeatureOptions": { "contactDate": "2025-01-01" }
}'
For SDK setup (Node.js, Python, Java, .NET), see the Getting Started Guide.
Request
| Field | Type | Required | Notes |
|---|---|---|---|
number |
string | Yes | Single E.164 number (with + prefix) |
features |
string[] | No | LineType (default), SimSwap, VoIPDetection (alpha), RND (alpha) |
rndFeatureOptions.contactDate |
string | If RND requested |
YYYY-MM-DD format |
Critical: If features is omitted, only LineType is returned. You must explicitly request SimSwap, VoIPDetection, or RND.
Response
Flat object (not an array). Each feature populates its own sub-object; unrequested features are null.
Top-level fields: number, countryCode (ISO 3166-1 alpha-2), traceId
line object:
| Field | Type | Values |
|---|---|---|
carrier |
string | Carrier name, e.g. "T-Mobile USA" |
type |
string enum | Landline, Mobile, VoIP, Special, Freephone, Other |
mobileCountryCode |
string | MCC, e.g. "310" |
mobileNetworkCode |
string | MNC, e.g. "260" |
ported |
boolean | Whether ported |
portingDate |
string | ISO 8601 datetime |
error |
object|null | Per-feature error (status, title, detail, type) |
simSwap object:
| Field | Type | Values |
|---|---|---|
swapped |
boolean | Whether SIM swap occurred |
swapPeriod |
string enum | Undefined, SP4H, SP12H, SP24H, SP48H, SP5D, SP7D, SP14D, SP30D, SPMAX |
error |
object|null | Per-feature error |
voIPDetection object (alpha):
| Field | Type | Values |
|---|---|---|
probability |
string enum | Unknown, Low, Likely, High -- not numeric |
error |
object|null | Per-feature error |
rnd object (alpha):
| Field | Type | Values |
|---|---|---|
disconnected |
boolean | Disconnected after contactDate |
error |
object|null | Per-feature error |
For full response schemas, see the API Reference.
Common Workflows
1. Fraud check before verification
- Look up the number with
features: ["SimSwap", "VoIPDetection"] - If
simSwap.swappedistrueandswapPeriodisSP4HorSP24H→ flag as high risk - If
voIPDetection.probabilityisHighorLikely→ require additional verification - If either feature returns a non-null
error→ fall back to the other feature's result for risk scoring - Otherwise → proceed with SMS/voice verification
2. Pre-send number hygiene
- Look up the number with
features: ["LineType", "RND"](includerndFeatureOptions.contactDate) - If
rnd.disconnectedistrue→ remove from contact list - Route based on
line.type: SMS forMobile, voice forLandline
3. Combined lookup + verification
- Look up the number with
features: ["LineType", "SimSwap"] - If
line.typeisLandline→ use voice verification instead of SMS - If
simSwap.swappedistrue→ skip SMS verification, use an alternative channel - See Combined Lookup + Verification for the full flow.
4. Multiple numbers
No batch endpoint. Use parallel requests:
const results = await Promise.all(
numbers.map((number) => sinch.numberLookup.lookup({ number, features: ['LineType', 'SimSwap'] }))
);
Gotchas
featuresmust be explicit. Omitting it returns onlyLineType. SIM swap, VoIP, and RND require explicit opt-in.- VoIP probability is a string enum, not a 0–1 score. Values:
Unknown,Low,Likely,High. - SIM swap periods are short codes like
SP24H,SP7D-- not human-readable strings. - Partial failures are possible. Each feature sub-object has its own
error. A lookup can succeed forlinebut fail forsimSwap. - RND requires
contactDate. OmittingrndFeatureOptionswhen requestingRNDcauses a400. - SIM swap depends on carrier support. Not available for all numbers or regions.
- VoIPDetection and RND are alpha. Behavior may change.
- Rate limiting.
429 Too Many Requestswhen exceeded. Contact Sinch for tier info. - Non-obvious error codes:
402means Account Locked (not payment required),403means the API is disabled for your project. If response includes a403, direct the user to check this documentation.
Links
More from sinch/skills
sinch-conversation-api
Sends and receives omnichannel messages with Sinch Conversation API. One unified API for SMS, WhatsApp, RCS, MMS, Viber, Messenger, and more. Use when sending texts, WhatsApp messages, rich cards, carousels, templates, batch messages, or building multi-channel messaging.
81sinch-authentication
Configures Sinch API credentials and authentication. Use when setting up OAuth2, Basic auth, application signing, or API keys for any Sinch product including Conversation API, Voice, Verification, Numbers, Fax, and Mailgun. Also use when troubleshooting 401 Unauthorized, 403 Forbidden, invalid signature, or credential errors against any Sinch API. For SDKs usage, see sinch-sdks.
76sinch-mailgun
Sends, receives, and tracks email via the Mailgun (Sinch) API. Use when the user wants to send email, manage domains, configure webhooks, query email events/logs, manage templates, handle suppressions (bounces, unsubscribes, complaints), set up inbound routes, manage mailing lists, DKIM keys, or IP warmup using Mailgun.
74sinch-provisioning-api
Provisions and manages channel resources for Conversation API projects, including WhatsApp accounts/senders/templates, RCS senders, KakaoTalk senders/templates, webhooks, and bundles. Use when the user asks to onboard channels, configure provisioning webhooks, manage templates, orchestrate multi-service bundles, or automate channel setup.
73sinch-numbers-api
Search, rent, manage, and release phone numbers with the Sinch Numbers API. Use when listing active numbers, searching available numbers, renting or releasing numbers, updating number configuration (SMS/voice/callback), managing emergency addresses, or checking available regions.
71sinch-10dlc
Registers US 10DLC brands and campaigns with Sinch for A2P SMS messaging. Use when the user needs to register a brand, create a 10DLC campaign, check registration status, troubleshoot a 10DLC rejection, fix an EIN mismatch, upgrade from simplified to full registration, or qualify a campaign for US SMS sending on 10-digit long codes. Do NOT use for non-US messaging or toll-free/short code registration.
69