---
title: "Create signing link"
url: "https://docs.signnow.com/docs/signing-link/operations/create-signing-link"
type: "endpoint"
section: "signing-link"
slug: "signing-link/operations/create-signing-link"
method: "POST"
path: "/link"
operation_id: "create-signing-link"
authorization: "bearer"
---

# Create signing link

`POST /link`

This endpoint allows users to generate a signing link and a QR code for a specific document.

**Add values of smart fields to a redirect URI** 

If you create a link for a template that contains smart fields, you can add smart field values to the redirect uri using placeholders.

1. Create a template with smart fields 
2. Create a single signing link for the template with `redirect_uri` parameter that contains field placeholders to match field values.

*Example*

```
https://example.com?firstname=[smart_fields.firstname]&lastname=[smart_fields.lastname]

```

For more information, check out our video tutorial.

<details open>

**<summary>Video tutorial</summary>**

<sub><sup>Note: The design shown in the video is outdated, but the flow is still accurate. You can go ahead and follow the steps as demonstrated.</sup></sub>

[Video tutorial](https://www.youtube.com/watch?v=XbUwX_2S5eU)

</details>

## Authorization

bearer

## Request Body

**Schema**

```json
{
  "type": "object",
  "properties": {
    "lastname": {
      "type": "string",
      "example": "Doe",
      "description": "Signer's last name that appears in the welcome message. Can be used with or without a first name. If neither first nor last name is specified, the signer is referred to as Guest Signer.",
      "x-stoplight": {
        "id": "194iu2xbxlfyj"
      }
    },
    "firstname": {
      "type": "string",
      "example": "Jane",
      "description": "Signer's first name that appears in the welcome message header. Can be used with or without a last name. If neither first nor last name is specified, the signer is referred to as Guest Signer.",
      "x-stoplight": {
        "id": "rpudac10llpro"
      }
    },
    "document_id": {
      "type": "string",
      "example": "bf19a9dba96745b6bf516dc4118ea639faac18f3",
      "description": "Template ID"
    },
    "redirect_uri": {
      "type": "string",
      "example": "https://example.com?firstname=[smart_fields.firstname]&lastname=[smart_fields.lastname]",
      "description": "When all the requested fields are completed and signed, the signer is redirected to this URI. Can contain placeholders referencing the values of smart fields."
    }
  },
  "x-examples": {
    "example-1": {
      "document_id": "{{document_id}}",
      "redirect_uri": "https://google.com?firstname=[smart_fields.firstname]&lastname=[smart_fields.lastname]"
    }
  }
}
```

**Example** (`Example 1`)

```json
{
  "lastname": "Doe",
  "firstname": "Jane",
  "document_id": "bf19a9dba96745b6bf516dc4118ea639faac18f3",
  "redirect_uri": "https://example.com?firstname=[smart_fields.firstname]&lastname=[smart_fields.lastname]"
}
```

## Responses

### 200

**Example** (`Example 1`)

```json
{
  "url": "https://signnow.com/s/e9P6v1WW",
  "url_qrcode": "https://signnow.com/qrcode/e9P6v1WW",
  "url_no_signup": "https://signnow.com/s/NKb23XO3",
  "url_no_signup_qrcode": "https://signnow.com/qrcode/NKb23XO3"
}
```

**Example** (`application/json`)

```json
{
  "url": "https://signnow.com/s/YYY6v1WW",
  "url_qrcode": "https://signnow.com/qrcode/XXX6v1WW",
  "url_no_signup": "https://signnow.com/s/xxx23XO3",
  "url_no_signup_qrcode": "https://signnow.com/qrcode/XXX23XO3"
}
```

### 400

- The document contains no unassigned roles.
- The document ID is incorrect.

**Example** (`Example 1`)

```json
{
  "errors": [
    {
      "code": 65582,
      "message": "A document must have at least one role that does not have a fixed e-mail to create an invite link."
    }
  ]
}
```

**Example** (`No unassigned roles`)

```json
{
  "errors": [
    {
      "code": 65582,
      "message": "A document must have at least one role that does not have a fixed e-mail to create an invite link."
    }
  ]
}
```

**Example** (`Incorrect document ID`)

```json
{
  "errors": [
    {
      "code": 65582,
      "message": "Document not found"
    }
  ]
}
```

## Code Examples

> Replace `$SIGNNOW_ACCESS_TOKEN` and any `{placeholder}` values before running.

### cURL

```bash
curl -X POST \
  "https://api.signnow.com/link" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"lastname": "Doe", "firstname": "Jane", "document_id": "bf19a9dba96745b6bf516dc4118ea639faac18f3", "redirect_uri": "https://example.com?firstname=[smart_fields.firstname]&lastname=[smart_fields.lastname]"}'
```

---
*Full reference: https://docs.signnow.com/docs/signing-link/operations/create-signing-link*
