# Embedded sending

Embedded sending lets users add and position fields on documents without leaving your application. Signable provides the document setup page as an embeddable URL, so you do not need to build and maintain your own drag-and-drop field editor.

Embedded sending currently covers the "Add fields" step (green box)  of the Envelope Send Flow (all boxes). In future, it will expand to cover the entire envelope sending flow.

```mermaid
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#E3F4FC', 'primaryBorderColor': '#0077B6', 'primaryTextColor': '#333333'}}}%%
flowchart LR
  A[Select your docs] --> B[Add recipients]
  B --> C[Add fields]
  C --> D[Summary & send]
  
style C fill:#1DBC60,stroke:#333,stroke-width:2px
```

br
Embedded sending user interface
Your application controls the rest of the sending journey. You create the draft envelope and its parties through the API, display Signable's document setup page  in an iframe, and send the completed draft when your user is ready.

## What users can do

In the embedded document setup page, users can:

- Preview every document in the envelope
- Add fields to a document
- Assign fields to the parties already created through the API
- Move, resize, edit, and remove fields


## How embedded sending works

1. Your server creates a draft envelope with at least one document and one party.
2. Your server creates a short-lived embed session for the draft.
3. Signable returns a `session_url`.
4. Your application loads the URL in an iframe.
5. The user positions and configures fields in Signable's document setup page.
6. Your application asks the user to review any details you manage outside the iframe.
7. Your server sends the prepared envelope through the API.


br
div
```mermaid
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#E3F4FC', 'primaryBorderColor': '#0077B6', 'primaryTextColor': '#333333'}}}%%
flowchart TD
    A[Create draft envelope] --> B[Create embed session]
    B --> C[Load session URL in iframe]
    C --> D[User sets up document fields]
    D --> E[Review in your application]
    E --> F[Send prepared envelope]
```

## Responsibilities

Embedded sending provides the document setup interface. Your integration remains responsible for the steps before and after it.

| Your application | Embedded document setup |
|  --- | --- |
| Upload documents when creating the draft | Display documents |
| Create parties and set their names, email addresses, roles, messages, passwords, and mobile numbers | Add and position fields |
| Configure signing order, OTP, reminders, expiry, and other envelope settings | Assign fields to existing parties |
| Provide review, confirmation, and error states | Save field changes |
| Send the completed draft | — |


## Future iterations

Over time, embedded sending will expand to support the entire envelope sending journey, from document upload through to reviewing an envelope summary and sending the envelope.

To introduce these enhancements incrementally, [Create an embed session](/openapi/embed-sessions/createembedsession) includes a `config` parameter. It currently only supports a `component` value of `document_setup`. As we add functionality, new values will become available. We’ll announce these enhancements in advance through our [changelog](/changelog), giving you time to plan for and adopt them at your own pace.

What would you like to see next for embedded sending? [Submit a feature request](https://signable.fider.io/).

## Security

Create draft envelopes and embed sessions from your server. Never expose your Signable API key in browser code.

An embed session URL contains a short-lived credential and expires after 120 seconds. Treat it as sensitive, avoid logging it, and load it promptly. Create a new session if the URL expires before the embedded page loads.

When the URL is loaded, the embedded application securely exchanges the session token for a JSON Web Token (JWT). The JWT authenticates subsequent requests made by the embedded document setup page, so your API key is never exposed to the browser or iframe. The session expires after 60 minutes.

## Related documentation

- [Embed document setup in your application](/guides/embedded-sending/embed-document-setup) – Implement the create draft, embed and send flow.