For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
        • phoneNumber
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Response Example
  • Example
REST ClientLookupResource

phoneNumber

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

MFA

Next
Built with

Phone Number Lookup namespace.

Path parameters

e164_numberstringRequired
The phone number in E.164 format.

Query parameters

includestringOptional
Further number information to include in the response, some of which are billable. You can specify: carrier (Lookup full carrier information for the number), cnam (Lookup Caller ID information for the number). Separate multiple values with a comma: include=carrier,cnam.

Response

country_code_numberintegerOptional
The Country code associated with the number.
national_numberstringOptional
Number in the countries national format.
possible_numberbooleanOptional
Whether the number supplied is a possible number.
valid_numberbooleanOptional
Whether the number supplied is a valid number.
national_number_formattedstringOptional
The E164 number formatted in national format.
international_number_formattedstringOptional
The E164 number formatted in international format.
e164stringOptional
The number in E164 format.
locationstringOptional
The location of the number based on its area code and NPA.
country_codestringOptional
The ISO3166 alpha 2 country code associated with the number.
timezoneslist of stringsOptional
The time zones associated with the number.
number_typestringOptional
The type of number based on its area code and NPA.
carrierobjectOptional
Carrier information. Adding include=carrier to your request will do a live lookup to determine the current carrier information about this number.
cnamobjectOptional
Caller ID information. Adding include=cnam to your request will do a live lookup to determine the current caller ID information about this number.

Response Example

Response
1{
2 "country_code_number": 1,
3 "national_number": "5551234567",
4 "possible_number": true,
5 "valid_number": true,
6 "national_number_formatted": "(555) 123-4567",
7 "international_number_formatted": "+1 555-123-4567",
8 "e164": "+15551234567",
9 "location": "Texas",
10 "country_code": "US",
11 "timezones": [
12 "string"
13 ],
14 "number_type": "Fixed Line or Mobile",
15 "carrier": {
16 "lrn": "15551234567",
17 "spid": "683X",
18 "ocn": "12345",
19 "lata": "99999",
20 "city": "Aberdeen",
21 "state": "WA",
22 "jurisdiction": "indeterminate",
23 "lec": "Verizon",
24 "linetype": "landline"
25 },
26 "cnam": {
27 "caller_id": "John Smith"
28 }
29}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient();
4const result = await client.lookup.phoneNumber("+15551234567");
5console.log(result);