---
title: "Query phone number attributes"
method: POST
path: "/number-risk-score/1/query"
tags: ["platform", "number-risk-score"]
---

# Query phone number attributes

`POST /number-risk-score/1/query`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/number-risk-score/1/query`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - HTTP basic

Receives a phone number and user consent, and returns various attributes for the given number.
An empty object is returned for any attributes that have no information.

## Request body

- Af9b8d75feb9ef8fdc8a04b912e3888bebe39d66ecc19747cc114307487c2bbcNrsApiRequest: Number Risk Score API request object
  - `phoneNumber` string, required: Phone number in international format (e.g., +1234567890). Must be between 5 and 15 digits, allowing an optional leading plus sign (+).
  - `consentGranted` boolean, required: Indicates whether the user of the mobile phone number has granted consent to perform a request. Must be true.

## Response `200`

Successful response

- Af9b8d75feb9ef8fdc8a04b912e3888bebe39d66ecc19747cc114307487c2bbcNrsApiResponse: Number Risk Score success response object
  - `status` 'OK' | 'NO_DATA', required: Status of the response, depending on the data availability
  - `riskLevel` 'LOW' | 'MEDIUM' | 'HIGH' | 'UNKNOWN', nullable, required: Risk level for given time frame
  - `requestId` string, required: A unique request identifier
  - `carrierInfo` Af9b8d75feb9ef8fdc8a04b912e3888bebe39d66ecc19747cc114307487c2bbcCarrierInfo, nullable: Carrier info response object
    - `originalNetwork` Af9b8d75feb9ef8fdc8a04b912e3888bebe39d66ecc19747cc114307487c2bbcOriginalNetwork, nullable: Information about phone number original network.
      - `networkName` string, nullable: Optional human readable name of the network.
      - `networkPrefix` string: Network prefix, i.e. the numeric code identifying the network/operator within the country's numbering plan.
      - `countryName` string, nullable: Optional name of the country the network operates in.
      - `countryPrefix` string: Country prefix, i.e. the international dialing/calling code of the country.
    - `ported` boolean, nullable: Flag describing whether or not number is ported to another network.
    - `portedNetwork` Af9b8d75feb9ef8fdc8a04b912e3888bebe39d66ecc19747cc114307487c2bbcPortedNetwork, nullable: Information about phone number ported network.
      - `networkName` string
      - `networkPrefix` string
      - `countryName` string
      - `countryPrefix` string
    - `lineType` 'FIXED_LINE' | 'MOBILE' | 'FIXED_LINE_OR_MOBILE' | 'PAGER' | 'TOLL_FREE' | 'PREMIUM_RATE' | 'SHARED_COST' | 'PERSONAL_NUMBER' | 'VOIP' | 'UAN' | 'VOICEMAIL' | 'UNKNOWN', nullable: Type of number.
  - `tenure` Af9b8d75feb9ef8fdc8a04b912e3888bebe39d66ecc19747cc114307487c2bbcTenure, nullable: Tenure response object
    - `firstSeen` string, date, nullable: Date of the first interaction with the phone number, in ISO 8601 format
    - `lastSeen` string, date, nullable: Date of the last interaction with the phone number, in ISO 8601 format
  - `numberVelocity` Af9b8d75feb9ef8fdc8a04b912e3888bebe39d66ecc19747cc114307487c2bbcNumberVelocity, nullable: Number Velocity response object
    - `last24Hours` Af9b8d75feb9ef8fdc8a04b912e3888bebe39d66ecc19747cc114307487c2bbcVelocitySummary: Detailed information about velocity.
      - `count` integer, nullable: Count of messages received
      - `riskLevel` 'LOW' | 'MEDIUM' | 'HIGH' | 'UNKNOWN', nullable: Risk level for given time frame
    - `last90Days` Af9b8d75feb9ef8fdc8a04b912e3888bebe39d66ecc19747cc114307487c2bbcVelocitySummaryDetailed: Detailed information about velocity.
      - `count` integer, nullable: Count of messages received
      - `riskLevel` 'LOW' | 'MEDIUM' | 'HIGH' | 'UNKNOWN', nullable: Risk level for given time frame
  - `rangeVelocity` Af9b8d75feb9ef8fdc8a04b912e3888bebe39d66ecc19747cc114307487c2bbcRangeVelocity, nullable: Range Velocity response object. Range in this context means a given phone number without the last three digits (e.g. range of the 5512345678 is 5512345)
    - `last24Hours` Af9b8d75feb9ef8fdc8a04b912e3888bebe39d66ecc19747cc114307487c2bbcVelocitySummary: Detailed information about velocity.
      - `count` integer, nullable: Count of messages received
      - `riskLevel` 'LOW' | 'MEDIUM' | 'HIGH' | 'UNKNOWN', nullable: Risk level for given time frame
    - `last90Days` Af9b8d75feb9ef8fdc8a04b912e3888bebe39d66ecc19747cc114307487c2bbcVelocitySummaryDetailed: Detailed information about velocity.
      - `count` integer, nullable: Count of messages received
      - `riskLevel` 'LOW' | 'MEDIUM' | 'HIGH' | 'UNKNOWN', nullable: Risk level for given time frame
  - `trustedInteraction` boolean, nullable: Indicator whether or not number had trusted interactions.
  - `botLikeBehavior` boolean, nullable: Indicator whether or not number had bot like behavior.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
