# Generating a verification link

This endpoint allows you to generate a hosted verification link, where applicants can upload their documents and verify themselves on your chosen flow.

By default, verification links are hosted on our domain <https://enterprise.personr.co> and are easily embeddable into your website or mobile application.&#x20;

Once an entity has finished uploading their documents, the verification will process automatically. You can go to [retrieving-entity-verification-results](https://manual.personr.co/api-documentation/entity-results/retrieving-entity-verification-results "mention") to retrieve the results, or create a webhook by going to [setting-up-a-webhook](https://manual.personr.co/api-documentation/entity-results/retrieving-entity-verification-results/setting-up-a-webhook "mention").

#### Example Verification Screen

<div align="left" data-full-width="false"><figure><img src="https://2927352434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAmEVMxhOOdXgxn7sjnz%2Fuploads%2F2meYhlPGS0a17mkOuVF7%2FScreenshot%202024-02-05%20at%2011.07.39%E2%80%AFam.png?alt=media&#x26;token=c94a8f5c-76bf-4ea4-9cc0-42653701abd6" alt="" width="245"><figcaption></figcaption></figure> <figure><img src="https://2927352434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAmEVMxhOOdXgxn7sjnz%2Fuploads%2FQAU3TvEKXmcPVomGouzF%2FScreenshot%202024-02-05%20at%2011.09.21%E2%80%AFam.png?alt=media&#x26;token=0fa5a50d-9b9c-4b33-a003-153f735c1ae7" alt="" width="245"><figcaption></figcaption></figure> <figure><img src="https://2927352434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAmEVMxhOOdXgxn7sjnz%2Fuploads%2FLJjYAZaRg5QGET0IXiWR%2FScreenshot%202024-02-05%20at%2011.09.59%E2%80%AFam.png?alt=media&#x26;token=85a9aea3-0b65-4968-b807-d442cab53e26" alt="" width="245"><figcaption></figcaption></figure></div>

Whitelabelling is available upon request. This allows you to customise the verification screens' logo, and colours to align with your brand. Additionally, you can add custom questions that an entity needs to answer. Reach out to your account manager to discuss your options.

We support all device types and modern browsers for verification.

***

## Generate a verification link

<mark style="color:green;">`POST`</mark> `/api-entity-verificationlink-create`

Generate a verification link, to send to a user acting on behalf of the company.

| 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>applicantId</code></td><td>string</td><td>Unique applicantId generated on entity creation <mark style="color:red;">(required)</mark></td></tr></tbody></table>

#### Request

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

```sh
curl --location 'https://enterprise.personr.co/api/1.1/wf/api-entity-verificationlink-create' \
--form 'applicant="4242424242424x424242424242424242"'
```

{% endtab %}

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

```javascript
var axios = require('axios');
var FormData = require('form-data');
var data = new FormData();
data.append('applicant', '4242424242424x424242424242424242');

var config = {
  method: 'post',
maxBodyLength: Infinity,
  url: 'https://enterprise.personr.co/api/1.1/wf/api-entity-verificationlink-create',
  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("applicant", "4242424242424x424242424242424242");

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

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

{% endtab %}

{% tab title="Ruby" %}

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

url = URI("https://enterprise.personr.co/api/1.1/wf/api-entity-verificationlink-create")

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

request = Net::HTTP::Post.new(url)
form_data = [['applicant', '4242424242424x424242424242424242']]
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-entity-verificationlink-create"

payload={'applicant': '4242424242424x424242424242424242'}
files=[

]
headers = {}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
```

{% endtab %}
{% endtabs %}

**Response**

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

```json
{
  "status": "success",
  "response": {
    "verificationLink": "https://enterprise.personr.co/entity-verification/4242424242424x424242424242424242",
    "customLink": "https://your-custom-domain.com/entity-verification/4242424242424x424242424242424242"
  }
}
```

{% endtab %}

{% tab title="400" %}

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

{% endtab %}
{% endtabs %}

#### Verification Link

The `verificationLink` key contains the standard **enterprise.personr.co** domain that entities can access to provide information and go through the flow.

#### Custom Link

The `customLink` key contains the custom domain that you have linked to the platform. To return a custom link with this endpoint, you need to specify the domain you wish to use when editing or creating a flow.

Custom links default to **enterprise.personr.co** if you have not specified which domain you'd like to use when creating or editing a flow.

{% hint style="info" %}
Verification links aren't sent to an applicant's email or phone number by default.
{% endhint %}

{% hint style="info" %}
For more customisation and control over what your users see, upload documents directly via API instead. Head to the next page to read more.
{% endhint %}
