---
title: "Add smart fields values to redirect URI"
method: POST
path: "/link"
---

# Add smart fields values to redirect URI

`POST /link`

## Request

- Base URL: `https://api.signnow.com`
- URL: `https://api.signnow.com/link`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/signnow/apis/signnow-api/docs/link/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint allows API users to add smart field values to the redirect URI via placeholders when creating a link for a template with smart fields.

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]

```

## Request body

- object
  - `document_id` string, required: ID of the document or template to create the link for.
  - `redirect_uri` string: The URI that opens after the document is signed. Max: `1500` characters.

## Response `200`

Successful response.

- object
  - `url` string: Signing link to the document for registered users.
  - `url_qrcode` string: URL of the QR code of the signing link.
  - `url_no_signup` string: Signing link to the document for users without a SignNow account.
  - `url_no_signup_qrcode` string: URL of the QR code of the signing link for users without a SignNow account.

## Other responses

- `400`: * Wrong, expired, or missing token. * `document_id` is missing. * The document doesn't exist. * The document belongs to another user. * The document has no fields. * Every role in the document has a fixed email address. * `redirect_uri` isn't a valid URL or is longer than `1500` characters.

---

[API](https://skmtc.dev/signnow/apis/signnow-api.md) - [All operations](https://skmtc.dev/signnow/apis/signnow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/signnow/apis/signnow-api/revisions/1c9c30a6142b?raw)
