Identity Insights API
The Identity Insights API allows clients to request real-time information related to a phone number. Users can retrieve any combination of different datasets, known as insights (e.g., number formatting, SIM swap information), in a single API call. Each insight is processed independently, and the response includes a structured result for each insight along with a status code.
Available Operations
Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Your JSON web token. | Headers | Bearer <JWT> |
447009000000A single phone number you want insights on, starting with the country code. You may optionally include a leading +, but do not use 00 at the beginning. Ideally, the number should follow the E.164 format. However, the API is designed to extract the phone number even if the input string contains alphanumeric characters, spaces, or symbols like brackets.
FraudPreventionAndDetectionSpecifies the reason for the request. This property is required only for Insights that use the Network Registry. For a Network Registry of type Production, the value must match one of the network profile purposes associated with your application. For a Network Registry of type Playground, the value must be "FraudPreventionAndDetection".
A list of objects representing the insight(s) requested for the phone number. At least one insight must be requested.
[ALPHA FEATURE] Request the format insight. This field must always be set to an empty object {}.
[ALPHA FEATURE] Request the sim_swap insight.
12400240240Period in hours to be checked for SIM swap.
Example Request
{ "phone_number": "447009000000", "purpose": "FraudPreventionAndDetection", "insights": { "format": {}, "sim_swap": { "period": 240 } } }{ "phone_number": "447009000000", "purpose": "FraudPreventionAndDetection", "insights": { "format": {}, "sim_swap": { "period": 240 } } }aaaaaaaa-bbbb-cccc-dddd-0123456789abThe unique identifier for your request. This is a alphanumeric string up to 40 characters.
A map of objects representing the requested insight(s), where each key corresponds to the name of the insight and the value contains the result and status of that insight.
Validates the format of a phone number and provides information based on that format.
GBTwo character country code for phone_number. This is in ISO 3166-1 alpha-2 format.
GBRThree character country code for phone_number. This is in ISO 3166-1 alpha-3 format.
United KingdomThe full name of the country where the phone_number is registered.
44The numeric prefix for the country where the phone_number is registered.
TexasThe location where the number was originally assigned, based on its prefix. This does not represent the real-time location of the device. The value indicates the country of origin or, when available, the specific geographical area associated with the number. Only landline and mobile numbers are eligible for offline location data.
List of time zones corresponding to the format.offline_location field, or a single-element list with the default "unknown" time zone if no other time zone was found or if the number is invalid. Time zone values follow the tz database identifiers.
447920000000The phone_number from your request, formatted in international E.164 format.
07920 000000The phone_number from your request, formatted according to the local convention of the country it belongs to.
truePhone number format validation involves verifying the length and prefix details at various levels to ensure accuracy and compliance with global numbering standards. A valid format means the number can be legitimately assigned by carriers to users. However, it does not guarantee that the number is currently assigned to a carrier or that it is reachable.
Indicates the status of the information returned for the specified phone number.
Code given to this status.
OKPARTIAL_SUCCESSNO_COVERAGEINVALID_NUMBER_FORMATINVALID_PURPOSENOT_FOUNDUNAUTHORIZEDINTERNAL_ERRORSuccessMore detailed status description.
Information about any recent SIM pairing changes related to a mobile account. A recent SIM swap may indicate a potential risk of account takeover.
2024-07-08T09:30:27.504ZDate and time in UTC ISO 8601 of latest SIM swap performed.
Indicates whether the SIM card has been swapped during the period.
Indicates the status of the information returned for the specified phone number.
Code given to this status.
OKPARTIAL_SUCCESSNO_COVERAGEINVALID_NUMBER_FORMATINVALID_PURPOSENOT_FOUNDUNAUTHORIZEDINTERNAL_ERRORSuccessMore detailed status description.
Example Response
{ "request_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab", "insights": { "format": { "country_code_iso2": "GB", "country_code_iso3": "GBR", "country_name": "United Kingdom", "country_prefix": "44", "offline_location": "Texas", "time_zones": [ "America/Chicago" ], "number_international": "447920000000", "number_national": "07920 000000", "format_valid": true, "status": { "code": "OK", "message": "Success" } }, "sim_swap": { "latest_sim_swap_at": "2024-07-08T09:30:27.504Z", "swapped": true, "status": { "code": "OK", "message": "Success" } } } }