Network/Country information for a phone number

Network/Country information for a phone number

Performs network lookup for a phone number

GET/workspaces/{workspaceId}/network-lookup
Authorization
Path parameters
workspaceId*WorkspaceId (string (uuid))

The ID for the workspace.

Example: "d386a801-ee8d-4aba-a7e4-78671bd3b11e"
Query parameters
Response

OK

Body
phoneNumberstring
countryCodestring

The country code of the phone number in ISO 3166-1 alpha-2 format

countryPrefixinteger
mccstring
mncstring
mccmncstring
operatorstring
formatsobject

The phone number in various formats

typeOfServiceenum

The type of service that the phone number is provisioned for, mobile, fixed or other

mobilefixedother
validationobject

The validation status of the phone number, and the reason for the status

Request
const response = await fetch('/workspaces/{workspaceId}/network-lookup', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "phoneNumber": "text",
  "countryCode": "text",
  "countryPrefix": 0,
  "mcc": "text",
  "mnc": "text",
  "mccmnc": "text",
  "operator": "text",
  "formats": {
    "e164": "text",
    "international": "text",
    "national": "text",
    "rfc3966": "text"
  },
  "typeOfService": "mobile",
  "validation": {
    "valid": false,
    "reason": "text"
  }
}

Last updated