---
title: "Embedded sending"
url: "https://docs.signnow.com/docs/guides-embedded-sending"
type: "page"
section: "Documentation"
slug: "guides-embedded-sending"
---

# Embedded sending

# About embedded sending

API users can embed SignNow to allow customers to **send signature requests without leaving a website** or app. You may also enable customers to add fields to the document or document group before sending a signature request.

No additional registration or email is required, and the workflow built into your app will continue running uninterrupted.

To embed the SignNow sending into your app, complete the following steps:

- [Upload](/docs/document/operations/upload-document) a document.
- Generate a link to the [document](/docs/embedded-sending/operations/post-v2-documents-document_id-embedded-sending) or [document group](/docs/embedded-sending/operations/post-v2-document-groups-document_group_id-embedded-sending).
- Use the **iFrame tag** with the link to embed the document or document group sending into your app or website.

See also:

- [Embedded signing guide](/docs/guides-embedded-signing)
- [Embedded editor guide](/docs/guides-embedded-editor)

## Before you begin

Before creating a link, make sure that:

- You are the owner of the document or document group.
- No invites to sign this document were sent (the document does not have a _pending_ or _signed_ status).

## Embedded sending features

Embedded sending is available for [documents](/docs/embedded-sending/operations/post-v2-documents-document_id-embedded-sending) and [document groups](/docs/embedded-sending/operations/post-v2-document-groups-document_group_id-embedded-sending).

For the embedded sending, you can customize the following:

- `link_expiration`: Number of minutes until the link expires. The allowed range is 15 (default) to 45 minutes for standard users. If your flow requires an expiration time of more than 45 minutes, please reach out to our support team at **api@signnow.com**.

- `redirect_uri`: When a user selects **Send Invite**, they are redirected to this URI.

- `redirect_target`: Defines how the `redirect_uri` opens. Possible values:
  - `self`:  `redirect_uri` opens in the same browser tab (default).
  - `blank`: `redirect_uri` opens in a new tab.

- `from_email`: 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 the **Contact Sender** button in the **More Actions** menu and on the detailed **From** card.

<details>

**<summary>From email in the UI</summary>**

![from_email_send_invite.png](/reference-assets/images/Embedded_sending/from_email/from_email_send_invite.png)

![from_email_invite_email_contact_sender.png](/reference-assets/images/Embedded_sending/from_email/from_email_invite_email_contact_sender.png)

![from_email_reply_to.png](/reference-assets/images/Embedded_sending/from_email/from_email_reply_to.png)

![from_email_ss_from.png](/reference-assets/images/Embedded_sending/from_email/from_email_ss_from.png)

![from_email_ss_contact_sender.png](/reference-assets/images/Embedded_sending/from_email/from_email_ss_contact_sender.png)

</details>  

- `from_name`: 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.

<details>

**<summary>From name in the UI</summary>**

![from_name_send_invite.png](/reference-assets/images/Embedded_sending/from_name/from_name_send_invite.png)

![from_name_invite_email.png](/reference-assets/images/Embedded_sending/from_name/from_name_invite_email.png)

![from_name_ss.png](/reference-assets/images/Embedded_sending/from_name/from_name_ss.png)

</details>

#### Explore the three scenarios of passing `from_name` and `from_email`:

**When both `from_email` and `from_name` are passed:**

The custom `from_name` appears:

- on the Send Invite page: **From**, **Invite Email Subject**, and **Invite Email Message**.
- in the invite and reassign emails: in **Email Subject** and **Email Body**.
- in the signing session: **From** in the header and on the detailed **From** card.

The custom `from_email` appears:

- in the invite and reassign emails: when clicking **Contact Sender** and in **Reply-to**.
- in the signing session: on the detailed **From** card, when clicking **Contact Sender** in the **More Actions** menu and on the detailed **From** card.

---
**When only `from_email` is passed:**

The custom `from_email` appears:

- in the signing session: when clicking **Contact Sender** in the **More Actions** menu and on the detailed **From** card; as the email in **From** in the header and on the detailed **From** card.
- in the invite and reassign emails: when clicking **Contact Sender** and in **Reply-to**.

The part of `from_email` (before `@`) appears:

- on the Send Invite page: **From**, **Invite Email Subject**, and **Invite Email Message**.
- in the invite and reassign emails: in **Email Subject** and **Email Body**.

---
**When only `from_name` is passed**:

The custom `from_name` appears:

- on the Send Invite page: **From**, **Invite Email Subject**, and **Invite Email Message**.
- in the invite and reassign emails: in email **subject** and email **body**.

The default (owner’s) `from_email` appears:

- in the invite and reassign emails: when clicking **Contact Sender** and in **Reply-to**.
- in the signing session: as the email in **From** in the header and on the detailed **From** card, and when clicking **Contact Sender** in the **More Actions** menu and on the detailed **From** card.

> The priority for customizing sender's email address and name is as follows:<br> 1. `from_email`/`from_name`<br> 2. Invite settings<br> 3. Branding at document / document group / application / user level<br> 4. Generic<br> 5. Branding at organization level

<!-- theme: success -->
> Get the existing `from_email` and `from_name` attributes using the [Get document](/docs/document/operations/get-document) (in `document_attributes`) request, or [Get document group](/docs/document-group/operations/get-documentgroup), [Get document group info](/docs/document-group/operations/get-document-group-info-v2) (in `document_group_attributes`) requests.

### Attributes specific to document embedded sending

For the document embedded sending, you can also customize the actions a sender of the invite can perform using the `type` parameter. Possible values:

- `document`: a sender can add fields to the document and send the invite.

- `invite`: a sender cannot add new fields and sends an invite with the fields that were added before. If no fields were added, a [freeform invite](/docs/document-field-invite/operations/post-field_invite) without fields is sent.

### Attributes specific to document group embedded sending

For embedded document group sending, you can add the `type` parameter to the payload to specify the sending step at which the embedded link should open and to control what actions the sender can perform.
- `manage`: The link opens on the Add documents to document group page (default).
- `edit`: The link opens in the editor, allowing the sender to add fields and send the invite.
- `send-invite`: The link opens on the Send Invite page.

#### Pre-filling document group parameters for embedded sending

You can customize the document group embedded sending for users by pre-filling these parameters:

- Recipient roles (`role` and `action`) in the editor and on the Send Invite page.
- Recipient emails in the editor and on the Send Invite page.
- CC recipient emails in the editor and on the Send Invite page.
- The invite email subject and message on the Send Invite page.

Learn more about [pre-filling the document group parameters](/docs/guides-embedded-sending#step-5-pre-fill-parameters-for-embedded-sending) for embedded sending.

## Document embedded sending

Let’s create a link to embed the sending of a document.

### Step 1. Upload a document

First, add the document you need for the embedded sending. There are three ways to upload a document:

- [Upload a document from your computer](/docs/document/operations/upload-document)

```bash
curl --request POST \
  --url https://api.signnow.com/document \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: multipart/form-data' \
  --form file=@/path/to/your/file.pdf
```

- [Upload a document from a URL](/docs/document/operations/post-v2-documents-url)

```bash
curl --request POST \
  --url https://api.signnow.com/v2/documents/url \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "https://file.com"
  }'
```

- [Upload a document with text tags](/docs/document/operations/upload-document-with-text-tags)

```bash
curl --request POST \
  --url https://api.signnow.com/document/fieldextract \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: multipart/form-data' \
  --form file= \
  --form Tags= \
  --form 'Tags[]:tag_name='
```

### Step 2. Generate a link to the document embedded sending

Now let’s generate a link that expires in 15 minutes. By setting the `type` parameter to `document`, we will enable the user to add fields to the document before sending an invite. After completion, the sender is redirected to the SignNow website in a new tab.

All the fields in the request body are optional. For more information, see [Create embedded sending link](/docs/embedded-sending/operations/post-v2-documents-document_id-embedded-sending).

```bash
curl --request POST \
  --url https://api.signnow.com/v2/documents/{{document_id}}/embedded-sending \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "document",
    "redirect_uri": "https://signnow.com",
    "link_expiration": 15,
    "redirect_target": "blank",
    "from_email": "sender@email.com",
    "from_name": "Anna Green"
  }'
```

You can use a template instead of the document. To do so, [create](/docs/template/operations/create-template) a template and use its ID as the `document_id` path parameter.

## Document group embedded sending

As an example, let's customize the document group embedded sending. 
- Create and assign a logo for the document group
- Pre-fill the document group invite parameters

### Step 1. Upload documents

Before creating a document group, upload the documents to your SignNow account.

Follow the same flow described in [Step 1](/docs/guides-embedded-sending#step-1-upload-a-document) of the document embedded sending.

### Step 2. Add fields to documents

Let's add fields to the documents that will form the document group in **Step 3**.

Use [`PUT /document/{{document_id}}`](/docs/request-payments/operations/put-document-document_id) endpoint.

> You can retrieve the document IDs in your SignNow account by clicking **More (...)** next to the document and selecting **Copy Id** in the dropdown. Alternatively, retrieve the document ID from the response when [uploading the document](/docs/guides-embedded-sending#step-1-upload-a-document).

We will add five text and two signature fields to the first document – Service agreement, and one text field and one signature field to the second document – Invoice.


<!--
type: tab
title: Adding fields to Service agreement
-->
```bash
curl --request PUT \
  --url https://api.signnow.com/document/{{document_id}} \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {{access_token}}' \
  --data '{
      "fields": [
          {
              "type": "text",
              "role": "Client",
              "page_number": 0,
              "x": 108,
              "y": 105,
              "width": 177,
              "height": 19,
              "required": false,
              "name": "client_name",
              "color": "000000",
              "bold": false,
              "italic": false,
              "underline": false,
              "align": "left",
              "font": "Arial",
              "max_lines": 0,
              "max_chars": 0,
              "arrangement": "none",
              "size": 12,
              "valign": "top",
              "font_size": 8
          },
          {
              "type": "text",
              "role": "Sales manager",
              "page_number": 0,
              "x": 267,
              "y": 65,
              "width": 177,
              "height": 11,
              "required": true,
              "name": "sales_text1",
              "color": "000000",
              "bold": false,
              "italic": false,
              "underline": false,
              "align": "left",
              "font": "Arial",
              "max_lines": 0,
              "max_chars": 0,
              "arrangement": "none",
              "size": 14,
              "valign": "top",
              "stretch_mode": "fixed",
              "font_size": 9
          },
          {
              "type": "text",
              "role": "Sales manager",
              "page_number": 0,
              "x": 355,
              "y": 65,
              "width": 177,
              "height": 11,
              "required": true,
              "name": "sales_text2",
              "color": "000000",
              "bold": false,
              "italic": false,
              "underline": false,
              "align": "left",
              "font": "Arial",
              "max_lines": 0,
              "max_chars": 0,
              "arrangement": "none",
              "size": 14,
              "valign": "top",
              "stretch_mode": "fixed",
              "font_size": 9
          },
          {
              "type": "text",
              "role": "Sales manager",
              "page_number": 0,
              "x": 430,
              "y": 65,
              "width": 177,
              "height": 11,
              "required": true,
              "name": "sales_text3",
              "color": "000000",
              "bold": false,
              "italic": false,
              "underline": false,
              "align": "left",
              "font": "Arial",
              "max_lines": 0,
              "max_chars": 0,
              "arrangement": "none",
              "size": 14,
              "valign": "top",
              "stretch_mode": "fixed",
              "font_size": 9
          },
          {
              "type": "text",
              "role": "Service provider",
              "page_number": 0,
              "x": 111,
              "y": 85,
              "width": 177,
              "height": 12,
              "required": true,
              "name": "provider_name",
              "color": "000000",
              "bold": false,
              "italic": false,
              "underline": false,
              "align": "left",
              "font": "Arial",
              "max_lines": 0,
              "max_chars": 0,
              "arrangement": "none",
              "size": 14,
              "valign": "top",
              "stretch_mode": "fixed",
              "font_size": 9
          },
          {
              "type": "signature",
              "role": "Client",
              "page_number": 0,
              "x": 187,
              "y": 517,
              "width": 177,
              "height": 22,
              "required": false,
              "name": "signature_client",
              "allowed_types": [
                  "type",
                  "draw",
                  "upload"
              ]
          },
          {
              "type": "signature",
              "role": "Service provider",
              "page_number": 0,
              "x": 187,
              "y": 553,
              "width": 177,
              "height": 22,
              "required": false,
              "name": "signature_provider",
              "allowed_types": [
                  "type",
                  "draw",
                  "upload"
              ]
          }
      ]
  }'
```
<!--
type: tab
title: Adding fields to Invoice
-->
```bash
curl --request PUT \
  --url https://api.signnow.com/document/{{document_id}} \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {{access_token}}' \
  --data '{
      "fields": [
          {
              "type": "text",
              "role": "Sales manager",
              "page_number": 0,
              "x": 251,
              "y": 569,
              "width": 56,
              "height": 12,
              "required": true,
              "name": "name_manager",
              "color": "000000",
              "bold": false,
              "italic": false,
              "underline": false,
              "align": "left",
              "font": "Arial",
              "max_lines": 0,
              "max_chars": 0,
              "arrangement": "none",
              "size": 14,
              "valign": "top",
              "stretch_mode": "fixed",
              "font_size": 10
          },
          {
              "type": "signature",
              "role": "Sales manager",
              "page_number": 0,
              "x": 318,
              "y": 532,
              "width": 83,
              "height": 21,
              "required": true,
              "name": "signature_manager",
              "allowed_types": [
                  "type",
                  "draw",
                  "upload"
              ]
          }
      ]
  }'
```
<!-- type: tab-end -->

### Step 3. Create a document group

Use the [`POST /documentgroup`](/docs/document-group/operations/create-document-group) endpoint to create a document group.

Add the document IDs in the payload. 

```bash
curl --request POST \
  --url https://api.signnow.com/documentgroup \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
      "document_ids": [
          "XXXX93743e954e92beafca9460ce5f83b87db885",
          "XXXXe6daa0354d22997abef44232d7fbc60683e6"
      ],
      "group_name": "Service agreement document group"
  }'
```
The successful request retrieves the document group ID.

### Step 4. Add a company logo for the document group

Create a brand with a logo and assign it to the document group. When the sender opens the link for the embedded sending, the logo will appear in the editor and on the Send Invite page. 

Learn more about the [embedded sending branding](/docs/guides-branding#customize-the-logo-for-the-embedded-sending-mode).

#### Create a brand

Use the [`POST /v2/brands`](/docs/general-branding/operations/post-brands) endpoint.

```bash
curl --request POST \
  --url https://api.signnow.com/v2/brands \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
      "title": "logo_for_embedded_dg"
  }'
```

The successful request retrieves the brand ID.

#### Create a logo brand resource

Next, we will upload a logo using the brand ID.

Use the [`POST /v2/brands/{{brand_id}}/resources/logo`](/docs/general-branding/operations/post-v2-brands-brand_id-logo) endpoint.

```bash
curl --request POST \
  --url https://api.signnow.com/v2/brands/{{brand_id}}/resources/logo \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: multipart/form-data' \
  --form 'logo=@"<path_to_logo_file>"'
```

#### Assign the brand with a logo to the document group

Use the [`PUT /v2/document-groups/{{document_group}}/brand`](/docs/general-branding/operations/put-v2-document-groups-document_group_id-brand) endpoint to assign the logo brand to the document group.

```bash
curl --request PUT \
  --url https://api.signnow.com/v2/document-groups/{{document_group}}/brand \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
      "brand_id": "XXXX4bf49c174b3aac1c8e377a6750da6b2afadc"
  }'
```

### Step 5. Pre-fill parameters for embedded sending

Use the endpoint [`PUT /v2/document-groups/{{document_group_id}}/recipients`](/docs/doc-group-field-invite/operations/put-v2-document-groups-document_group_id-recipients) to pre-fill parameters for embedded sending.

Let's pre-fill recipients `email`, `role`, `action`, `message`, and `subject` fields.
Also, add email addresses of CC recipients to the `cc` array.

> Pre-filling works correctly only if `name`=`role`.

<!-- theme: success -->
> You can use `{fullName}` and `{documentName}` placeholders for invite email `subject` and `message`.

```bash
curl --request PUT \
  --url https://api.signnow.com/v2/document-groups/{{document_group_id}}/recipients \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "recipients": [
          {
              "name": "Client",
              "email": "client@email.com",
              "order": 1,
              "documents": [
                  {
                      "id": "XXXX93743e954e92beafca9460ce5f83b87db885",
                      "role": "Client",
                      "action": "sign"
                  },
                  {
                      "id": "XXXXe6daa0354d22997abef44232d7fbc60683e6",
                      "role": "Client",
                      "action": "view"
                  }
              ],
              "attributes":{
                  "message": "Review and sign the service agreement",
                  "subject": "Service agreement"

              }
          },
          {
              "name": "Service provider",
              "email": "provider@email.com",
              "order": 1,
              "documents": [
                  {
                      "id": "XXXXe6daa0354d22997abef44232d7fbc60683e6",
                      "role": "Service provider",
                      "action": "view"
                  },
                  {
                      "id": "XXXX93743e954e92beafca9460ce5f83b87db885",
                      "role": "Service provider",
                      "action": "sign"
                  }
              ],
              "attributes":{
                  "message": "Review and sign the service agreement",
                  "subject": "Service agreement"

              }
          },
          {
              "name": "Sales manager",
              "email": "manager@email.com",
              "order": 1,
              "documents": [
                  {
                      "id": "XXXXe6daa0354d22997abef44232d7fbc60683e6",
                      "role": "Sales manager",
                      "action": "sign"
                  },
                  {
                      "id": "XXXX93743e954e92beafca9460ce5f83b87db885",
                      "role": "Sales manager",
                      "action": "sign"
                  }
              ],
              "attributes":{
                  "message": "Review and sign the service agreement",
                  "subject": "Service agreement"

              }
          }
      ],
      "cc": [
          "test1@test.com",
          "test2@test.com",
          "test3@test.com"
      ]
  }'
```

<!-- theme: success -->

> The priority for pre-filling the invite email subject and message is as follows:<br> - Values specified in the API request<br> - Customer's default values<br> - Common default values</br>

### Step 6. Generate a link to the document group embedded sending

Create a link for the embedded sending. Use the [`POST /v2/document-groups/{{document_group_id}}/embedded-sending`](/docs/embedded-sending/operations/post-v2-document-groups-document_group_id-embedded-sending) endpoint.

```bash
curl --request POST \
  --url https://api.signnow.com/v2/document-groups/{{document_group_id}}/embedded-sending \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {{access_token}}' \
  --data '{
      "redirect_uri": "https://example.com",
      "link_expiration": 15,
      "redirect_target": "self",
      "type": "send-invite"
  }'
```

The successful request retrieves the link for the embedded sending mode.

> Users can edit all pre-filled parameters when sending the embedded invite.

The embedded sending with the assigned logo and pre-filled parameters appears as follows:

**In the editor**

![embedded_sending_prefill_editor.png](/reference-assets/images/Embedded_sending/embedded_sending_prefill_editor.png)

**On the Send Invite page**

![embedded_sending_prefill_invite.png](/reference-assets/images/Embedded_sending/embedded_sending_prefill_invite.png)

## Try out in Postman

Access the [document embedded sending](https://www.postman.com/signnow-api/signnow-public-collection/folder/qriana2/embedded-sending?action=share&source=copy-link&creator=18977589&ctx=documentation) and [document group embedded sending](https://www.postman.com/signnow-api/signnow-public-collection/folder/53fruu5/embedded-sending-dg?action=share&source=copy-link&creator=18977589&ctx=documentation) flows in Postman, and feel free to embed the document sending into your system.


---
*Full page: https://docs.signnow.com/docs/guides-embedded-sending*
