# Verifying applicant identity data

With database verification, you only need to use this endpoint. Applicants are created and submitted for processing automatically. A lot of the data below is optional, but the match accuracy is increased when more data is provided.

Make sure you pass the correct `sourceCountry` when calling this endpoint. This tells us the relevant data sources to check within the country.

***

## Verify identity data

<mark style="color:green;">`POST`</mark> `/api-database-verification`

Create the applicant, match and verify the identity data, and request verification.

| Name          | Value                 |
| ------------- | --------------------- |
| Content-Type  | `multipart/form-data` |
| Authorization | `Bearer YOUR_TOKEN`   |

**Body**

<table><thead><tr><th>Name</th><th width="165">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>flowName</code></td><td>string</td><td><p>The name of the flow your Account Manager has provided</p><p><mark style="color:red;">(required)</mark></p></td></tr><tr><td><code>email</code></td><td>string</td><td>The applicant's email address <mark style="color:purple;">(optional)</mark></td></tr><tr><td><code>phone</code></td><td>string</td><td>The applicant's phone number <mark style="color:purple;">(optional)</mark></td></tr><tr><td><code>firstName</code></td><td>string</td><td>The applicant's first name <mark style="color:red;">(required)</mark></td></tr><tr><td><code>middleName</code></td><td>string</td><td>The applicant's middle name <mark style="color:purple;">(optional)</mark></td></tr><tr><td><code>lastName</code></td><td>string</td><td>The applicant's last name <mark style="color:red;">(required)</mark></td></tr><tr><td><code>dob</code></td><td>string</td><td>The applicant's date of birth, formatted as YYYY-MM-DD <mark style="color:purple;">(optional)</mark></td></tr><tr><td><code>idNumber</code></td><td>string</td><td>The applicant's document number  <mark style="color:purple;">(optional)</mark></td></tr><tr><td><code>sourceCountry</code></td><td>string</td><td>The applicant's country, used to check relevant sources, formatted in alpha-3 <mark style="color:red;">(required)</mark></td></tr><tr><td><code>street</code></td><td>string</td><td>The applicant's street number and name <mark style="color:purple;">(optional)</mark></td></tr><tr><td><code>city</code></td><td>string</td><td>The applicant's town or city <mark style="color:purple;">(optional)</mark></td></tr><tr><td><code>stateTerritory</code></td><td>string</td><td>The applicant's state or territory <mark style="color:purple;">(optional)</mark></td></tr><tr><td><code>postCode</code></td><td>string</td><td>The applicant's postcode <mark style="color:purple;">(optional)</mark></td></tr><tr><td><code>country</code></td><td>string</td><td><p>The applicant's address country, </p><p>formatted in alpha-3 <mark style="color:purple;">(optional)</mark></p></td></tr></tbody></table>

{% hint style="info" %}
Use **ISO 3166-1 A3** format for `sourceCountry` and `country.` See [here](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) for country codes.
{% endhint %}

#### Request

{% tabs %}
{% tab title="cURL" %}

```sh
curl --location 'https://enterprise.personr.co/api/1.1/wf/api-database-verification' \
--form 'flowName="Database Verification"' \
--form 'email="example@personr.co"' \
--form 'phone="0400000000"' \
--form 'firstName="SIMONE"' \
--form 'middleName="LEE"' \
--form 'lastName="HARDING"' \
--form 'dob="1985-10-27"' \
--form 'idNumber="1234567A"' \
--form 'sourceCountry="AUS"' \
--form 'street="123 EXAMPLE LANE"' \
--form 'city="PERTH"' \
--form 'stateTerritory="WESTERN AUSTRALIA"'
--form 'postCode="6000"' \
--form 'country="AUS"'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
var axios = require('axios');
var FormData = require('form-data');
var data = new FormData();

data.append('flowName', 'Database Verification');
data.append('email', 'example@personr.co');
data.append('phone', '0400000000');
data.append('firstName', 'SIMONE');
data.append('middleName', 'LEE');
data.append('lastName', 'HARDING');
data.append('dob', '1985-10-27');
data.append('idNumber', '1234567A');
data.append('sourceCountry', 'AUS');
data.append('street', '123 EXAMPLE LANE');
data.append('city', 'PERTH');
data.append('stateTerritory', 'WESTERN AUSTRALIA');
data.append('postCode', '6000');
data.append('country', 'AUS');

var config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://enterprise.personr.co/api/1.1/wf/api-database-verification',
  headers: { 
    ...data.getHeaders()
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
var form = new FormData();
form.append('flowName', 'Database Verification');
form.append('email', 'example@personr.co');
form.append('phone', '0400000000');
form.append('firstName', 'SIMONE');
form.append('middleName', 'LEE');
form.append('lastName', 'HARDING');
form.append('dob', '1985-10-27');
form.append('idNumber', '1234567A');
form.append('sourceCountry', 'AUS');
form.append('street', '123 EXAMPLE LANE');
form.append('city', 'PERTH');
form.append('stateTerritory', 'WESTERN AUSTRALIA');
form.append('postCode', '6000');
form.append('country', 'AUS');

var settings = {
  "url": "https://enterprise.personr.co/api/1.1/wf/api-database-verification",
  "method": "POST",
  "timeout": 0,
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
}).fail(function (error) {
  console.error(error);
});
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require "uri"
require "net/http"

url = URI("https://enterprise.personr.co/api/1.1/wf/api-database-verification")

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

request = Net::HTTP::Post.new(url)
form_data = [
  ['flowName', 'Database Verification'],
  ['email', 'example@personr.co'],
  ['phone', '0400000000'],
  ['firstName', 'SIMONE'],
  ['middleName', 'LEE'],
  ['lastName', 'HARDING'],
  ['dob', '1985-10-27'],
  ['idNumber', '1234567A'],
  ['sourceCountry', 'AUS'],
  ['street', '123 EXAMPLE LANE'],
  ['city', 'PERTH'],
  ['stateTerritory', 'WESTERN AUSTRALIA'],
  ['postCode', '6000'],
  ['country', 'AUS']
]
request.set_form form_data, 'multipart/form-data'

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

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://enterprise.personr.co/api/1.1/wf/api-database-verification"

payload = {
    'flowName': 'Database Verification',
    'email': 'example@personr.co',
    'phone': '0400000000',
    'firstName': 'SIMONE',
    'middleName': 'LEE',
    'lastName': 'HARDING',
    'dob': '1985-10-27',
    'idNumber': '1234567A',
    'sourceCountry': 'AUS',
    'street': '123 EXAMPLE LANE',
    'city': 'PERTH',
    'stateTerritory': 'WESTERN AUSTRALIA',
    'postCode': '6000',
    'country': 'AUS'
}

response = requests.post(url, data=payload)

print(response.text)
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "status": "success",
    "response": {
        "applicantId": "4242424242424242x42424242424242",
        "flow": "Database Verification",
        "status": "Pending"
    }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "statusCode": 400,
    "message": "Error: incorrect flowName provided"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.personr.co/api-documentation/database-verification/applicants/verifying-applicant-identity-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
