> For the complete documentation index, see [llms.txt](https://api.veratad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.veratad.com/vx/overview/generate-link.md).

# Generate Link

## Generate Link

<mark style="color:green;">`POST`</mark> `https://vx-be.idresponse.com/link/generate`

This endpoint allows you generate a direct link to an iFrame instance and send the user an email if desired.

#### Request Body

| Name                                          | Type    | Description                                              |
| --------------------------------------------- | ------- | -------------------------------------------------------- |
| options<mark style="color:red;">\*</mark>     | object  | The object where you place certain options               |
| send\_email<mark style="color:red;">\*</mark> | boolean | Set to true if you want the link to be sent via an email |

{% tabs %}
{% tab title="200 Link successfully generated" %}

```javascript
{
    "action": "PASS",
    "detail": "Link Generated",
    "link": "https://frontend.dcams.app?request_id=c9c40f18-2c30-43ef-a879-5a82f1c4uf76",
    "email_sent": true,
    "error_message": "",
    "error_description": ""
}
```

{% endtab %}
{% endtabs %}

## Sample Request Body

{% hint style="info" %}
You must provide a valid token when making this API call. So, make sure you retrieve your token first and then set it here.
{% endhint %}

```json
{
  "options": {
    "send_email": true
  },
  "reference": "CHECKLY TEST",
  "token": "{{TOKEN}}",
  "fn": "Tom",
  "ln": "Canfarotta",
  "addr": "707 HAWLEY LANE",
  "city": "STRATFORD",
  "state": "CT",
  "zip": "06614",
  "phone": "2015106000",
  "dob": "19820821",
  "email": "user_email@gmail.com",
  "email_fallback": false,
  "language": "",
  "country": "US",
  "bypassDesktopIntro": false,
  "qr": true,
  "additionalData": "{\"value_1\":\"test1\",\"value_2\":\"test2\"}",
  "styleToken": "",
  "resultMessages": {
    "success": {
      "verificationSuccessTitle": "",
      "verificationSuccessSubTitle": ""
    },
    "failure": {
      "verificationFailureTitle": "",
      "verificationFailureSubTitle": ""
    },
    "error": {
      "verificationErrorTokenTitle": "",
      "verificationErrorTokenSubTitle": "",
      "verificationErrorAlreadyVerifiedTitle": "",
      "verificationErrorAlreadyVerifiedSubTitle": "",
      "verificationErrorPendingTitle": "",
      "verificationErrorPendingSubTitle": "",
      "verificationErrorVelocityTitle": "",
      "verificationErrorVelocitySubTitle": ""
    }
  }
}
```

## Responses

| Description        | Value                                                                                                        |
| ------------------ | ------------------------------------------------------------------------------------------------------------ |
| action             | <p>PASS - the link was generated</p><p>ERROR - the link was not generated (see below for all error types</p> |
| detail             | A description of the action result                                                                           |
| link               | The URL value to provide the end user                                                                        |
| email\_sent        | Will be set to true or false                                                                                 |
| error\_message     | The overall error message                                                                                    |
| error\_description | A description of the error that occurred                                                                     |
