---
title: Phone Intel - Submit OTP
slug: api-marketplace/phone-intel-submit-otp
description: The "Submit OTP" API endpoint by Signzy Technologies allows users to retrieve detailed information about an Indian mobile phone number, including name, address, network operator, and transaction history. This API is useful for user onboarding, account cre
createdAt: 2023-04-20T19:20:32.000Z
---

## Introduction

The "Submit OTP" API endpoint serves to retrieve comprehensive information about a mobile phone number in India by submitting a previously generated one-time password (OTP) that was sent to the respective number as part of the Generate OTP API call.

By utilizing this endpoint, users can access details including the name and address associated with the phone number, along with additional information such as the mobile network operator, billing type, and other relevant data. This wealth of information proves instrumental in verifying user identities, conducting background checks, and enhancing the accuracy of customer data.

### Key Features

- **OTP Submission:** Allows users to submit a previously generated OTP for authentication purposes.
- **Comprehensive Information Retrieval:** Provides detailed information about the phone number, including name, address, mobile network operator, and billing type.
- **Identity Verification:** Assists in verifying user identities and conducting background checks effectively.

### Applications

- **Identity Verification:** Enables businesses to verify the identity of users during registration or authentication processes.
- **Background Checks:** Facilitates background checks to ensure the legitimacy of users and prevent fraudulent activities.
- **Data Accuracy Enhancement:** Helps in improving the accuracy of customer data by providing detailed information associated with mobile phone numbers.

### Conclusion

In conclusion, the "Submit OTP" API endpoint offers a valuable solution for retrieving detailed information about mobile phone numbers in India. By leveraging this endpoint, businesses can effectively verify user identities, conduct background checks, and enhance the accuracy of their customer data, thereby fostering trust and reliability in their services.

***

## API Details

### Endpoints

:::CodeblockTabs
Production Endpoint

```text
POST https://api.signzy.app/api/v3/phone/getNumberDetails
```
:::

:::CodeblockTabs
UAT/Testing Endpoint

```text
POST https://api-preproduction.signzy.app/api/v3/phone/getNumberDetails
```
:::

***

### Request Body Parameters

| **Parameter** | **Data** **Type** | **Description**                                                                                                                                                                                                                     | **Required** |
| ------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| countryCode   | String            | The country code associated with the mobile number. The value to be passed is "91".                                                                                                                                                 | Mandatory    |
| mobileNumber  | String            | The mobile number for which OTP is requested                                                                                                                                                                                        | Mandatory    |
| referenceId   | String            | A unique identifier for tracking the request, generated in response to the Generate OTP API call.                                                                                                                                   | Mandatory    |
| otp           | String            | The One-Time Password (OTP) for verification, generated in response to the Generate OTP API call. The OTP has a validity of **10 mins**. In case the time duration passes by, you would need to again consume the Generate OTP API. | Mandatory    |
| extraFields   | Boolean           | If set as true, get additional information about billing history, device information, and other pertinent information in response. The default value for this flag is false.                                                        | Optional     |

```json
{
   "countryCode": "91",
   "mobileNumber": "...mobile number...",
   "referenceId": "...refId...",
   "otp": "...otp...",
   "extraFields": true/false
}
```

***

### Request Headers

| **Name**      | **Value**        | **Required** | **Description**                                                                                            |
| ------------- | ---------------- | ------------ | ---------------------------------------------------------------------------------------------------------- |
| Content-Type  | application/json | Mandatory    | The type of content that the request body contains.                                                        |
| Authorization | XXXXXXXXXXXXXXX  | Mandatory    | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

### Code Samples

:::CodeblockTabs
```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/phone/getNumberDetails' \
--header 'Content-Type: application/json' \
--header 'Authorization: <your access token>' \
--data '{
    "countryCode": "91",
    "mobileNumber": "xxxxxxxxxx",
    "referenceId": "telecom_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "otp": "yyyyyy",
    "extraFields": false
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "countryCode": "91",
  "mobileNumber": "xxxxxxxxxx",
  "referenceId": "telecom_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "otp": "yyyyyy",
  "extraFields": false
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/phone/getNumberDetails',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '<your access token>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

```python
import http.client
import json

conn = http.client.HTTPSConnection("preproduction.signzy.app")
payload = json.dumps({
  "countryCode": "91",
  "mobileNumber": "xxxxxxxxxx",
  "referenceId": "telecom_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "otp": "yyyyyy",
  "extraFields": false
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<your access token>'
}
conn.request("POST", "/api/v3/phone/getNumberDetails", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api-preproduction.signzy.app/api/v3/phone/getNumberDetails"
  method := "POST"

  payload := strings.NewReader(`{
    "countryCode": "91",
    "mobileNumber": "xxxxxxxxxx",
    "referenceId": "telecom_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "otp": "yyyyyy",
    "extraFields": false
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "<your access token>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

***

### Response Body Parameters

| **Parameter**                                        | **Data** **Type** | **Description**                                                                                                                                |
| ---------------------------------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| result                                               | Object            | The main container for all response information.                                                                                               |
| result.name                                          | String            | The name of the individual (e.g., "John Doe").                                                                                                 |
| result.address                                       | String            | The complete address, including street, city, state, country, and pin code.                                                                    |
| result.splitAddress                                  | Object            | Subdivided address details.                                                                                                                    |
| result.splitAddress.district                         | Array             | Array containing district information.                                                                                                         |
| result.splitAddress.state                            | Array             | Array containing state information, with possible abbreviations.                                                                               |
| result.splitAddress.city                             | Array             | Array containing city information.                                                                                                             |
| result.splitAddress.pincode                          | String            | The postal code of the address.                                                                                                                |
| result.splitAddress.country                          | Array             | Array containing country information, with possible abbreviations.                                                                             |
| result.splitAddress.addressLine                      | String            | The street address line (e.g., "123, GENERIC STREET").                                                                                         |
| result.dob                                           | String            | Date of birth in the format "YYYY-MM-DD" (e.g., "1990-01-01").                                                                                 |
| result.mobileNumber                                  | String            | The primary mobile number.                                                                                                                     |
| result.countryCode                                   | String            | The country code associated with the mobile number (e.g., "91").                                                                               |
| result.email                                         | String            | The email address                                                                                                                              |
| result.mobileNetworkOperator                         | String            | The mobile network operator or carrier.                                                                                                        |
| result.billingType                                   | String            | The type of billing ( "postpaid"/"prepaid").                                                                                                   |
| result.alternatePhone                                | String            | An alternate phone number.                                                                                                                     |
| result.extraFields                                   | Object            | Additional fields that may be included.                                                                                                        |
| result.extraFields.loyalty\_category                 | String            | The loyalty category associated with the mobile number (e.g., "AIRTEL THANKS GOLD").                                                           |
| result.extraFields.device\_name                      | String/Null       | The device name associated with the mobile number. Null if not available.                                                                      |
| result.extraFields.international\_roaming            | String/Null       | The international roaming associated with the mobile number. Null if not available.                                                            |
| result.extraFields.auto\_pay                         | Boolean           | Indicates whether the mobile number is set to auto-pay (e.g. false).                                                                           |
| result.extraFields.credit\_limit                     | Number/Null       | The credit limit associated with the mobile number. Null if not available.                                                                     |
| result.extraFields.activation\_date                  | String/Null       | The activation date associated with the mobile number. Null if not available.                                                                  |
| result.extraFields.current\_pack.name                | String            | The name of the current pack associated with the mobile number (e.g., "Unlimited Pack").                                                       |
| result.extraFields.current\_pack.price               | Number/Null       | The price of the current pack associated with the mobile number. Null if not available.                                                        |
| result.extraFields.current\_pack.expiry              | String/Null       | The expiry date of the current pack associated with the mobile number. Null if not available.                                                  |
| result.extraFields.payment\_mode                     | Array             | The payment modes associated with the mobile number.                                                                                           |
| result.extraFields.billing\_history\[]               | Array/Object      | An array of billing history entries associated with the mobile number. Each entry contains date, amount, payment\_mode, description, and type. |
| result.extraFields.billing\_history\[].date          | String/Null       | The date of the billing history entry associated with the mobile number. Null if not available.                                                |
| result.extraFields.billing\_history\[].amount        | Number/Null       | The amount of the billing history entry associated with the mobile number. Null if not available.                                              |
| result.extraFields.billing\_history\[].payment\_mode | String/Null       | The payment mode of the billing history entry associated with the mobile number. Null if not available.                                        |
| result.extraFields.billing\_history\[].description   | String/Null       | The description of the billing history entry associated with the mobile number. Null if not available.                                         |
| result.extraFields.billing\_history\[].type          | String/Null       | The type of the billing history entry associated with the mobile number. Null if not available.                                                |

:::CodeblockTabs
200

```json
{
    "result": {
        "name": "John Doe",
        "address": "123, Generic Street, Cityville, State, Country-123456",
        "splitAddress": {
            "district": [
                "DISTRICT"
            ],
            "state": [
                [
                    "STATE",
                    "ST"
                ]
            ],
            "city": [
                "CITY"
            ],
            "pincode": "123456",
            "country": [
                "COUNTRY",
                "CNTRY",
                "XYZ"
            ],
            "addressLine": "123, GENERIC STREET"
        },
        "dob": "1990-01-01",
        "mobileNumber": "xxxxxxxxxxx",
        "countryCode": "xx",
        "email": "john.doe@example.com",
        "mobileNetworkOperator": "carrier",
        "billingType": "postpaid",
        "alternatePhone": "yyyyyyyyyyy",
        "extraFields": {}
        "extraFields": {
            "device_name": "XXXX",
            "current_pack": {
                "name": "xx",
                "expiry": "XX YY, XX XX:XX AM",
                "price": "xx"
            },
            "loyalty_category": "xx",
            "billing_history": [
                {
                    "amount": "xx",
                    "date": "xx, 2024 xx:xx xx",
                    "payment_mode": "xx",
                    "description": "xx xx xxxxxxxxxx"
                },
                {
                    "amount": "xx",
                    "date": "xx, 2024 xx:xx xx",
                    "payment_mode": "xx",
                    "description": "xx xx-xx-xxxxxx xxxxxxxxxx"
                }
            ]
        }
    }
}
```
:::

### Error Codes

:::CodeblockTabs
400

```json
// Invalid mobile number
{
    "error": {
        "statusCode": 400,
        "name": "Error",
        "message": "Mobile number is not valid",
        "status": 400
    }
}

// Invalid or non supported country code
{
    "error": {
        "statusCode": 400,
        "name": "Error",
        "message": "Country Code is not valid / not supported",
        "status": 400
    }
}

// Invalid Reference Id
{
    "error": {
        "name": "Error",
        "status": 400,
        "message": "Reference ID does not correspond to mobile number",
        "statusCode": 400
    }
}

// Fields are not allowed to be empty
{
    "error": {
        "statusCode": 400,
        "name": "error",
        "message": "<message>",
        "status": "Bad Request"
    }
} 
// <message>
//1. Country code is not allowed to be empty string
//2. Mobile number  is not allowed to be empty string
//3. referenceId is not allowed to be empty
//4. OTP is not allowed to be empty string
```

401

```json
// When API key is not passed in headers
{
    "message": "No API key found in request"
}

// When wrong API key is passed in headers
{
    "message": "Invalid authentication credentials"
}
// When OTP is incorrect
{
    "error": {
        "statusCode": 401,
        "name": "error",
        "message": "OTP Authentication Failed due to incorrect OTP",
        "status": 401,
        
    }
}

// When OTP is expired
{
    "error": {
        "statusCode": 401,
        "name": "error",
        "message": "OTP Authentication Failed due to otp is expired",
        "status": 401,
    }
}
```

404

```json
{
    "error": {
        "statusCode": 404,
        "name": "error",
        "message": "Not Found",
        "status": 404,
    }
}
```

409

```json
{
    "error": {
        "statusCode": 409,
        "name": "error",
        "message": "Upstream Down",
        "status": 409,   
    }
}
```

500

```json
{
    "error": {
        "name": "error",
        "message": "Internal Server Error",
        "status": 500,
        "reason": "ERROR",
        "type": "Internal Server Error",
        "statusCode": 500
    }
}
```
:::

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!

