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
  • Core
    • Overview
    • Authorization
    • Base URL
    • Data formats
    • Paging
    • Error codes
    • Permissions
  • Calling
  • Datasphere
  • Logs
  • Messaging
  • Phone Number Management
      • GETGet phone number
      • GETList phone numbers
      • POSTPurchase phone number
      • DELRelease phone number
      • GETSearch phone numbers
      • PUTUpdate phone number
      • POSTImport phone number
      • GETLook up phone number
      • POSTAssign Resource to phone route
  • Platform
  • Resource Management
LogoLogoSignalWire Docs
Log inSign up
Support
Phone Number ManagementPhone Numbers

Look up phone number

|View as Markdown|Open in Claude|
GET
https://{your_space_name}.signalwire.com/api/relay/rest/lookup/phone_number/:e164_number
GET
/api/relay/rest/lookup/phone_number/:e164_number
$curl https://{your_space_name}.signalwire.com/api/relay/rest/lookup/phone_number/e164_number \
> -u "<project_id>:<api_token>"
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}
This endpoint allows you to look up validity and formatting information about a number. You can optionally lookup additional information about the number such as carrier and caller ID data. #### Permissions No API token scope is required to make a successful request to this endpoint. [Learn more about API scopes](/docs/platform/your-signalwire-api-space).
Was this page helpful?
Previous

Assign Resource to phone route

Next
Built with

This endpoint allows you to look up validity and formatting information about a number. You can optionally lookup additional information about the number such as carrier and caller ID data.

Permissions

No API token scope is required to make a successful request to this endpoint.

Learn more about API scopes.

Authentication

AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ```

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

The request has succeeded.
country_code_numberinteger
The Country code associated with the number.
national_numberstring
Number in the countries national format.
possible_numberboolean
Whether the number supplied is a possible number.
valid_numberboolean
Whether the number supplied is a valid number.
national_number_formattedstring
The E164 number formatted in national format.
international_number_formattedstring
The E164 number formatted in international format.
e164string
The number in E164 format.
locationstring
The location of the number based on its area code and NPA.
country_codestring
The ISO3166 alpha 2 country code associated with the number.
timezoneslist of strings
The time zones associated with the number.
number_typestring
The type of number based on its area code and NPA.
carrierobject

Carrier information. Adding include=carrier to your request will do a live lookup to determine the current carrier information about this number.

cnamobject

Caller ID information. Adding include=cnam to your request will do a live lookup to determine the current caller ID information about this number.

Errors

401
Unauthorized Error
404
Not Found Error
500
Internal Server Error

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)