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

# Create link for document

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

## Request

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

This endpoint allows API users to generate a link to embed the SignNow document editor into their app, allowing their customers to edit documents without sending them for signing.

To generate an embedded editor link, make sure that:

- the document has not been sent for signing or signed.
- the document is not deleted or archived.

## Request body

- object
  - `redirect_uri` string: The page that opens after the signing session ends.
  - `link_expiration` integer: 15 minutes by default. Can be set max to 43200 minutes by a user with Admin level of access.
  - `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 a link in case of correct request.

- object
  - `data` object: Embedded editor link.
    - `url` string: Embedded editor link for the document.

## Other responses

- `400`: * Wrong, expired, or missing token. * Document was already sent. **Validation errors:** * `redirect_uri` is not a string. * Empty `redirect_uri`. * `redirect_uri` is longer than 2048 characters. * `redirect_uri` is not a correct URL. * `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.
- `403`: User doesn't own the document.
- `422`: * The document is in the Trash folder, code 19001021. Message: "Cannot fulfill request for the document in Trash folder." * The document was deleted, including from the Trash folder, code 19001022. Message: "Document not found".

---

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