# 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. A custom domain can be configured from within the platform if you intend to self-host.

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

Webhooks are the recommended method for integration.

#### 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%2Ft5M9mi470PCO7VWw9Uob%2FIMG_3489%20(1).png?alt=media&#x26;token=3772e9bd-94ae-4126-aad7-03ca54c523a1" alt="" width="188"><figcaption></figcaption></figure> <figure><img src="https://2927352434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAmEVMxhOOdXgxn7sjnz%2Fuploads%2FSAzhbFKDIQ4loeyRYPKU%2FIMG_3491.PNG?alt=media&#x26;token=df13a989-b5a9-4a72-88d3-26b27acff893" alt="" width="188"><figcaption></figcaption></figure> <figure><img src="https://2927352434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAmEVMxhOOdXgxn7sjnz%2Fuploads%2FLxRNBmnRGh7tnPWb3Icq%2FIMG_3492.PNG?alt=media&#x26;token=469516f1-4a79-41ac-82db-8f13c1d35e31" alt="" width="188"><figcaption></figcaption></figure></div>

Whitelabelling is available upon request. This allows you to customise the verification screens' logo, font, and colours to align with your brand. 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-verificationlink-create`

Generate a verification link, to send to an applicant.

**Headers**

| 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>applicant</code></td><td>string</td><td>Unique applicantId generated on applicant 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-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-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-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-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-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/verification/4242424242424x424242424242424242",
    "customLink": "https://enterprise.personr.co/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 applicants 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 document images directly via API instead. Head to the next page to read more.
{% endhint %}
