> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iinkedsign.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Links

> Learn how to create and utilize package signing links.

## Overview

When adding or updating a package you can set `generateSignerLinks` to `true` and return signer links. Signer links are URLs that allow signers to sign packages or join VSR meetings.

You can utilize these links to create custom integrations, for example, sending them via email, SMS, or embedding them in your own applications.

## Request

```http Request highlight={6} theme={null}
POST /packages/add
{
  "name": "New Package with Links",
  "type": "concurrent",
  "state": "open",
  "generateSignerLinks": true,
  },
  "signers": [
    {
      "firstName": "signer",
      "lastName": "one",
      "email": "signer.one@syngrafii.com"
    }
  ],
  "documents": [
    {
      "fileName": "document.pdf",
      "fileId": "682f1158-e3f5-4329-8f88-c52cb5447d8c"
    }
  ]
}
```

<Tip>
  Links can be generated when calling [`packages/add`](/v4/api/packages/add), [`packages/update`](/v4/api/packages/update) , or [`packages/{packageId}/link`](/v4/api/packages/link) API endpoints.
</Tip>

<Note>
  When you add a package with `generateSignerLinks` set to `true`, subsequent requests to update the package will also return new signer links. You can override this behavior by setting `generateSignerLinks` to `false` in the `packages/update` request.
</Note>

## Response

<Tabs>
  <Tab title="Signing link">
    A signing link will automatically take the signer to the next unsigned document or IDV if enabled.

    ```json Response theme={null}
    {
        "package": {
            ...
            "signers": [
                {
                    ...
                    "signLink": "https://sign.syngrafii.com/link/abcdef123456"
                    ...
                }
            ],
            ...
        }
    }
    ```
  </Tab>

  <Tab title="Meeting link (VSR)">
    A VSR meeting link will automatically take the participant to the VSR meeting room lobby.

    ```json Response theme={null}
    {
        "package": {
            ...
            "signers": [
                {
                    ...
                    "meetingLink": "https://sign.syngrafii.com/link/abcdef123456"
                    ...
                }
            ],
            ...
        }
    }
    ```
  </Tab>

  <Tab title="Edit link">
    An edit link allows you to embed our [package editor](/v4/guides/embed-editor) experience within an iframe in your application.

    If you set `embedded` to `true` in the package options when adding or updating a package, the edit link will be included in the response.

    ```json Response theme={null}
    {
        "package": {
            ...
            "editLink": {
                "link": "https://sign.syngrafii.com/link/abcdef123456"
            },
            ...
        }
    }
    ```

    You can also generate a new edit link for an existing package by calling the [Packages link API](/v4/api/packages/link) endpoint:

    ```http Request theme={null}
    POST /packages/{packageId}/link/edit
    ```
  </Tab>
</Tabs>

## Linking

To link to a signing package or VSR meeting, you can use the `signLink` or `meetingLink` URL provided in the package details. This link will take the user directly to the signing experience for their documents.

<Tabs>
  <Tab title="Signing link redirect">
    ```html theme={null}
    <a href="https://sign.syngrafii.com/link/abcdef123456">Sign Document</a>
    ```
  </Tab>

  <Tab title="Meeting link redirect">
    ```html theme={null}
    <a href="https://sign.syngrafii.com/link/abcdef123456">Join Meeting</a>
    ```
  </Tab>
</Tabs>

## Redirecting

During add package you can optionally specify a `returnUrl` and `returnState` for each signer. When a signer completes the signing process, they will be redirected back to your application using the specified `returnUrl` and optional `returnState`.

```http Request highlight={6,12-13} theme={null}
POST /packages/add
{
  "name": "New Package with Return URL",
  "type": "concurrent",
  "state": "open",
  "generateSignerLinks": true,
  "signers": [
    {
      "firstName": "signer",
      "lastName": "one",
      "email": "signer.one@syngrafii.com",
      "returnUrl": "https://example.com/thank-you",
      "returnState": "some-state"
    }
  ],
  "documents": [
    {
      "fileName": "document.pdf",
      "fileId": "682f1158-e3f5-4329-8f88-c52cb5447d8c"
    }
  ]
}
```

### Return parameters

When the signer is redirected back to your application, the following parameters will be included in the query string:

<ParamField body="packageId" type="string">
  The package ID of the signing package.
</ParamField>

<ParamField body="signerId" type="string">
  The signer ID of the signer.
</ParamField>

<ParamField body="success" type="boolean">
  When `true`, indicates that the signing process was completed successfully.
</ParamField>

<ParamField body="state" type="string">
  The value of `returnState` if provided when adding the signer.
</ParamField>

## Embedding

You can also embed the signing experience directly into your application using an **iframe**. This allows users to sign documents without leaving your site.

View the [Embed signing guide](/v4/guides/embed-signing) for more information.

## Lifetime

Signing links are valid until the signing package becomes executed, rescinded, expired, or deleted. They will expire within 24 hours of their sign by date.

Meeting links will allow hosts and signers to still join the VSR lobby for up to 7 days after it is executed. They will expire 7 days after the scheduled meeting start time.

<Warning>
  When updating a signer's:

  * **Email address** => all existing signer links will be invalidated.
  * **Mobile number** => all existing mobile signer links will be invalidated.

  It is recommended that you update any existing links you might have stored from previous requests to ensure signer links remain valid.
</Warning>
