> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vlenseg.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vlenseg.com/_mcp/server.

# PII inquiry with OTP: submit ID images

POST https://api.vlenseg.com/api/FRAServices/PersonallyIdentifiableInformation
Content-Type: application/json

Submits front/back ID images and a phone number for validation against national records, with phone-number ownership proven by a one-time password.

Call `POST /api/FRAServices/RequestOtpForPii` first to send the code and get an `otpRequestId`, then send it here together with the `otpCode` the user received.

Same URL as the no-OTP variant — the only difference is that `otpRequestId` and `otpCode` are present. They travel together: send both, or send neither and use the [no-OTP variant](/api-reference/vlens-api/fra-services/post-fraservices-personallyidentifiableinformation).

Reference: https://docs.vlenseg.com/api-reference/vlens-api/fra-services/post-fraservices-personallyidentifiableinformation-with-otp

## Authentication

- `ApiKey` header (required) — Static API key issued to your tenant. Required on every request.
- `Authorization` header (bearer token, required) — End-user JWT from registration or login. Required for verification, signing, and user-scoped operations.

## Servers

- `https://api.vlenseg.com` (Production, default)
- `https://api.vlens.co` (Staging)

## Request

### Body (application/json)

This endpoint expects an object.

- `idBackBase64Image` (string, required)
- `idFrontBase64Image` (string, required)
- `phoneNumber` (string, required)
- `otpRequestId` (string, required) — The `otpRequestId` returned by `POST /api/FRAServices/RequestOtpForPii`.
- `otpCode` (integer, required) — The OTP the user received, sent as a JSON number (`123456`), not a string.

## Response

### 200

PII inquiry result.

- `data` (object, optional)
  - `phoneNumberOwnerOutput` (object, optional, nullable) — Whether the phone number is registered to the ID holder.
    - `isMatched` (boolean, optional)
    - `errorCode` (integer, optional, nullable)
    - `errorKey` (string, optional, nullable)
    - `errorMessage` (string, optional, nullable)
  - `idFrontOutput` (object, optional, nullable) — Extraction and checks for the front of the national ID.
    - `services` (object, optional) — Per-service check results for one scanned document. Note the capitalised `Validations` key — the OCR API returns the same block as lowercase `validations`.
      - `Validations` (object, optional, nullable)
        - `validation_errors` (list of object, optional)
          - `field` (string, optional)
          - `value` (string, optional)
          - `errors` (list of object, optional)
            - `code` (integer, optional)
            - `message` (string, optional)
      - `spoofing` (object, optional, nullable)
        - `fake` (boolean, optional) — `true` when the document image looks forged.
      - `classification` (object, optional, nullable)
        - `doc_type` (string, optional) — Detected document type, e.g. `id_front`, `id_back`.
      - `liveness` (boolean, optional, nullable) — Not run for this flow — always `null`.
      - `AML` (object, optional, nullable) — Anti-money-laundering screening result. `null` when not run.
        - `AML_matched` (boolean, optional) — `true` when the holder matched an AML record.
        - `data` (list of object, optional) — Matched AML records, empty when none.
      - `SRC` (object, optional, nullable)
    - `data` (object, optional)
      - `name` (string, optional, nullable) — Full Arabic name.
      - `first_name` (string, optional, nullable) — Arabic first name.
      - `last_names` (string, optional, nullable) — Arabic last names.
      - `name_english` (string, optional, nullable) — Transliterated full name.
      - `first_name_english` (string, optional, nullable) — Transliterated first name.
      - `last_names_english` (string, optional, nullable) — Transliterated last names.
      - `idNumber` (string, optional, nullable) — National ID number.
      - `idKey` (string, optional, nullable) — ID key printed on the card.
      - `dateOfBirth` (string, optional, nullable) — Date of birth, ISO 8601.
      - `gender` (string, optional, nullable) — Gender in Arabic. May be `null` on the front — the back scan carries it reliably.
      - `govern` (string, optional, nullable) — Governorate (Arabic).
      - `govern_english` (string, optional, nullable) — Governorate (English).
      - `city` (string, optional, nullable) — City (Arabic).
      - `district` (string, optional, nullable) — District (Arabic).
      - `address` (string, optional, nullable) — Full address (Arabic).
      - `address_1` (string, optional, nullable) — Address line 1 (Arabic).
      - `address_2` (string, optional, nullable) — Address line 2 (Arabic).
      - `address_english` (string, optional, nullable) — Full address (English).
      - `address_1_english` (string, optional, nullable) — Address line 1 (English).
      - `address_2_english` (string, optional, nullable) — Address line 2 (English).
      - `client_transaction_id` (string, optional, nullable) — Your own reference ID, echoed back.
      - `request_id` (string, optional, nullable) — Identifier for this individual request.
      - `transaction_id` (string, optional, nullable) — The transaction the scan belongs to.
    - `error_code` (integer, optional, nullable)
    - `error_message` (string, optional, nullable)
    - `error_descriptions` (list of string, optional, nullable)
  - `idBackOutput` (object, optional, nullable) — Extraction and checks for the back of the national ID.
    - `services` (object, optional) — Per-service check results for one scanned document. Note the capitalised `Validations` key — the OCR API returns the same block as lowercase `validations`.
      - `Validations` (object, optional, nullable)
        - `validation_errors` (list of object, optional)
          - `field` (string, optional)
          - `value` (string, optional)
          - `errors` (list of object, optional)
            - `code` (integer, optional)
            - `message` (string, optional)
      - `spoofing` (object, optional, nullable)
        - `fake` (boolean, optional) — `true` when the document image looks forged.
      - `classification` (object, optional, nullable)
        - `doc_type` (string, optional) — Detected document type, e.g. `id_front`, `id_back`.
      - `liveness` (boolean, optional, nullable) — Not run for this flow — always `null`.
      - `AML` (object, optional, nullable) — Anti-money-laundering screening result. `null` when not run.
        - `AML_matched` (boolean, optional) — `true` when the holder matched an AML record.
        - `data` (list of object, optional) — Matched AML records, empty when none.
      - `SRC` (object, optional, nullable)
    - `data` (object, optional)
      - `maritalStatus` (string, optional, nullable) — Marital status (Arabic).
      - `marital_status_english` (string, optional, nullable) — Marital status (English).
      - `job` (string, optional, nullable) — Job (Arabic).
      - `job_english` (string, optional, nullable) — Job (English).
      - `jobTitle` (string, optional, nullable) — Job title (Arabic).
      - `job_title_english` (string, optional, nullable) — Job title (English).
      - `religion` (string, optional, nullable) — Religion (Arabic).
      - `religion_english` (string, optional, nullable) — Religion (English).
      - `husbandName` (string, optional, nullable) — Husband's name (Arabic), when present on the card.
      - `husbandName_english` (string, optional, nullable) — Husband's name (English).
      - `releaseDate` (string, optional, nullable) — Card release date, ISO 8601.
      - `idExpiry` (string, optional, nullable) — Card expiry date, ISO 8601.
      - `idNumber` (string, optional, nullable) — National ID number.
      - `gender` (string, optional, nullable) — Gender (Arabic).
      - `gender_english` (string, optional, nullable) — Gender (English).
      - `client_transaction_id` (string, optional, nullable) — Your own reference ID, echoed back.
      - `request_id` (string, optional, nullable) — Identifier for this individual request.
      - `transaction_id` (string, optional, nullable) — The transaction the scan belongs to.
    - `error_code` (integer, optional, nullable)
    - `error_message` (string, optional, nullable)
    - `error_descriptions` (list of string, optional, nullable)
  - `csoOutput` (object, optional, nullable) — Central Security Organisation (CSO) validation result.
    - `isValid` (boolean, optional)
    - `errorCode` (integer, optional, nullable)
    - `errorMessage` (string, optional, nullable)
  - `criminalRecordValidationOutput` (object, optional, nullable) — Criminal-record check result. `null` when the check is not enabled for your tenant.
- `error_code` (integer, optional, nullable)
- `error_message` (string, optional, nullable)
- `error_descriptions` (list of string, optional, nullable)

## Examples

**Request**

```json
{
  "idBackBase64Image": "<string>",
  "idFrontBase64Image": "<string>",
  "phoneNumber": "01000000000",
  "otpRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "otpCode": 123456
}
```

**Response**

```json
{
  "data": {
    "phoneNumberOwnerOutput": {
      "isMatched": true,
      "errorCode": 0,
      "errorKey": null,
      "errorMessage": null
    },
    "idFrontOutput": {
      "services": {
        "Validations": {
          "validation_errors": []
        },
        "spoofing": {
          "fake": false
        },
        "classification": {
          "doc_type": "id_front"
        },
        "liveness": null,
        "AML": {
          "AML_matched": false,
          "data": []
        },
        "SRC": null
      },
      "data": {
        "name": "محمد على حسن ابراهيم",
        "first_name": "محمد",
        "last_names": "على حسن ابراهيم",
        "name_english": "Mohamed Ali Hassan Ibrahim",
        "first_name_english": "Mohamed",
        "last_names_english": "Ali Hassan Ibrahim",
        "idNumber": "29001011234567",
        "idKey": "AB1234567",
        "dateOfBirth": "1990-01-01T00:00:00",
        "gender": null,
        "govern": "القاهرة",
        "govern_english": "Cairo",
        "city": "القاهرة",
        "district": "المعادي",
        "address": "١٢ شارع النيل-المعادي القاهرة",
        "address_1": "١٢ شارع النيل",
        "address_2": "المعادي القاهرة",
        "address_english": "12 Nile Street-Maadi Cairo",
        "address_1_english": "12 Nile Street",
        "address_2_english": "Maadi Cairo",
        "client_transaction_id": null,
        "request_id": "00000000-0000-0000-0000-000000000000",
        "transaction_id": "9c1f0e2a-7b3d-4f5a-8c6e-1d2b3a4c5d6e"
      },
      "error_code": null,
      "error_message": null,
      "error_descriptions": null
    },
    "idBackOutput": {
      "services": {
        "Validations": {
          "validation_errors": []
        },
        "spoofing": {
          "fake": false
        },
        "classification": {
          "doc_type": "id_back"
        },
        "liveness": null,
        "AML": null,
        "SRC": null
      },
      "data": {
        "maritalStatus": "متزوج",
        "marital_status_english": "married",
        "job": "مهندس",
        "job_english": "Engineer",
        "jobTitle": "",
        "job_title_english": null,
        "religion": "مسلم",
        "religion_english": "muslim",
        "husbandName": "",
        "husbandName_english": null,
        "releaseDate": "2023-04-01T00:00:00",
        "idExpiry": "2030-04-29T00:00:00",
        "idNumber": "29001011234567",
        "gender": "ذكر",
        "gender_english": "male",
        "client_transaction_id": null,
        "request_id": "00000000-0000-0000-0000-000000000000",
        "transaction_id": "9c1f0e2a-7b3d-4f5a-8c6e-1d2b3a4c5d6e"
      },
      "error_code": null,
      "error_message": null,
      "error_descriptions": null
    },
    "csoOutput": {
      "isValid": true,
      "errorCode": 0,
      "errorMessage": null
    },
    "criminalRecordValidationOutput": null
  },
  "error_code": null,
  "error_message": null,
  "error_descriptions": null
}
```

**SDK Code**

```python FRA Services_postFraservicesPersonallyidentifiableinformationWithOtp_example
import requests

url = "https://api.vlenseg.com/api/FRAServices/PersonallyIdentifiableInformation"

payload = {
    "idBackBase64Image": "<string>",
    "idFrontBase64Image": "<string>",
    "phoneNumber": "01000000000",
    "otpRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "otpCode": 123456
}
headers = {
    "ApiKey": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript FRA Services_postFraservicesPersonallyidentifiableinformationWithOtp_example
const url = 'https://api.vlenseg.com/api/FRAServices/PersonallyIdentifiableInformation';
const options = {
  method: 'POST',
  headers: {ApiKey: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"idBackBase64Image":"<string>","idFrontBase64Image":"<string>","phoneNumber":"01000000000","otpRequestId":"3fa85f64-5717-4562-b3fc-2c963f66afa6","otpCode":123456}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go FRA Services_postFraservicesPersonallyidentifiableinformationWithOtp_example
package main

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

func main() {

	url := "https://api.vlenseg.com/api/FRAServices/PersonallyIdentifiableInformation"

	payload := strings.NewReader("{\n  \"idBackBase64Image\": \"<string>\",\n  \"idFrontBase64Image\": \"<string>\",\n  \"phoneNumber\": \"01000000000\",\n  \"otpRequestId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n  \"otpCode\": 123456\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("ApiKey", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby FRA Services_postFraservicesPersonallyidentifiableinformationWithOtp_example
require 'uri'
require 'net/http'

url = URI("https://api.vlenseg.com/api/FRAServices/PersonallyIdentifiableInformation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["ApiKey"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"idBackBase64Image\": \"<string>\",\n  \"idFrontBase64Image\": \"<string>\",\n  \"phoneNumber\": \"01000000000\",\n  \"otpRequestId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n  \"otpCode\": 123456\n}"

response = http.request(request)
puts response.read_body
```

```java FRA Services_postFraservicesPersonallyidentifiableinformationWithOtp_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.vlenseg.com/api/FRAServices/PersonallyIdentifiableInformation")
  .header("ApiKey", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"idBackBase64Image\": \"<string>\",\n  \"idFrontBase64Image\": \"<string>\",\n  \"phoneNumber\": \"01000000000\",\n  \"otpRequestId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n  \"otpCode\": 123456\n}")
  .asString();
```

```php FRA Services_postFraservicesPersonallyidentifiableinformationWithOtp_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.vlenseg.com/api/FRAServices/PersonallyIdentifiableInformation', [
  'body' => '{
  "idBackBase64Image": "<string>",
  "idFrontBase64Image": "<string>",
  "phoneNumber": "01000000000",
  "otpRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "otpCode": 123456
}',
  'headers' => [
    'ApiKey' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp FRA Services_postFraservicesPersonallyidentifiableinformationWithOtp_example
using RestSharp;

var client = new RestClient("https://api.vlenseg.com/api/FRAServices/PersonallyIdentifiableInformation");
var request = new RestRequest(Method.POST);
request.AddHeader("ApiKey", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"idBackBase64Image\": \"<string>\",\n  \"idFrontBase64Image\": \"<string>\",\n  \"phoneNumber\": \"01000000000\",\n  \"otpRequestId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n  \"otpCode\": 123456\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift FRA Services_postFraservicesPersonallyidentifiableinformationWithOtp_example
import Foundation

let headers = [
  "ApiKey": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "idBackBase64Image": "<string>",
  "idFrontBase64Image": "<string>",
  "phoneNumber": "01000000000",
  "otpRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "otpCode": 123456
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.vlenseg.com/api/FRAServices/PersonallyIdentifiableInformation")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```