---
title: "Create link for document"
method: POST
path: "/v2/documents/{document_id}/embedded-sending"
---

# Create link for document

`POST /v2/documents/{document_id}/embedded-sending`

## Request

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

This endpoint allows API users to create a link for embedded document sending.

Use the request body attributes to define where the link opens (the editor or the Send Invite page), configure redirect options, specify link expiration, and customize the sender’s email and name appearance.

For more information, see [Embedded sending guide](/docs/guides-embedded-sending) and 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=MR_Rko0X0aU)

</details>

## Request body

- object
  - `type` string, required: The type of invite settings available by the link. Possible values: `invite` - the Send Invite page opens for the document where user add the signer's address, email subject and message etc.; `document` - the document opens in the editor for adding fillable fields, and then the Send Invite page opens.
  - `from_name` string: Use this attribute to customize the name that appears: 1) on the Send Invite page (From, Invite Email Subject, and Invite Email Message); 2) in the invite and reassign emails: in email subject and email body; 3) in the signing session: as the name in From in the header and on the detailed From card.
  - `from_email` string: Use this attribute to customize the email address that appears: 1) [part before @]on the Send Invite page (From, Invite Email Subject, and Invite Email Message) 2) in the invite and reassign emails: [part before @] in email subject and email body; when clicking Contact Sender and in Reply-to; 3) in the signing session: as the email in From in the header and on the detailed From card; when clicking Contact Sender in the More Actions menu and on the detailed From card.
  - `redirect_uri` string: The page that opens after the signing session ends.
  - `link_expiration` integer: Specifies how many minutes the link remains active. The allowed range is 15 to 45 minutes.
  - `redirect_target` string: Determines whether to open the redirect link in the new tab in the browser, or in the same tab after the signing session. Possible values: `blank` - opens the link in the new tab, `self` - opens the link in the same tab, default value.

## Response `200`

Returns the link for embedded sending in case of correct request.

- object
  - `data` object, required: Embedded sending link.
    - `url` string, required: Embedded sending link for the document.

## Other responses

- `400`: * Incorrect or missing token. * User doesn't own the document. * Document not found. * Document was already sent. * Cannot send an invite for the document from Trash folder. * Incorrect payload. **Validation errors:** * Missing `type`. * Incorrect `type`. Allowed values: `document`, `invite`. * `redirect_uri` is not a string. * `redirect_uri` is longer than 2048 characters. * `redirect_uri` is not a correct URL. * UTF 4-byte characters in `redirect_uri` are not supported. * `link_expiration` is not an integer. * `link_expiration` must be between 15 and 45. * Custom `link_expiration` is more than 43200 minutes. * `redirect_target` is not a string. * Incorrect `redirect_target`. Allowed values: `self`, `blank`. * `redirect_uri` is required if `redirect_target` is added.

---

[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)
