---
updatedAt: 2026-04-15T15:59:51.000Z
agentTools:
  projectIndex: https://developers.pandadoc.com/llms.txt
---

# How to Embed Document Signing

Embed PandaDoc document signing directly in your website or application so end users sign without being redirected to PandaDoc.

## Problem

You want your end users (clients, candidates, employees) to view and sign PandaDoc documents directly inside your application, without being redirected to the PandaDoc website.

## Prerequisites

* A document in `document.sent` status (see [How to Send a Document via API](https://developers.pandadoc.com/docs/send-document))
* The end user's browser supports [`postMessage`](https://caniuse.com/mdn-api_window_postmessage)

## Solution

### Step 1: Create a document and send it

Create a document using any [creation method](https://developers.pandadoc.com/docs/create-document-overview), wait for it to reach `document.draft` status, then send it with `silent: true` to skip email notifications:

`POST https://api.pandadoc.com/public/v1/documents/{document_id}/send`

```json
{ "silent": true }
```

See [Understanding Asynchronous Document Creation](https://developers.pandadoc.com/docs/reliable-document-workflow) for details on waiting for draft status.

![Optimal Flow](https://files.readme.io/29d93e8-embed-flow.png)

### Step 2: Create a document session

Generate a signing session for a recipient:

`POST https://api.pandadoc.com/public/v1/documents/{document_id}/session`

```json
{
  "recipient": "jane@example.com",
  "lifetime": 90000
}
```

The response returns a session `id` that you use to embed the document.

### Step 3: Embed the signing experience

Use the [**pandadoc-signing**](https://developers.pandadoc.com/docs/signing-session-embed) library for a type-safe integration with region support:

```typescript
import { Signing } from "pandadoc-signing";

const signing = new Signing(
  "signing-container",
  {
    sessionId: "your-session-id-here",
    width: 800,
    height: 600,
  },
  {
    region: "com", // Optional: 'com' or 'eu'
  }
);

await signing.open();
```

> 📘 **Legacy Manual Approach**
>
> If you have an existing integration using HTML iframes and JavaScript event listeners, see the [Legacy Manual Approach](https://developers.pandadoc.com/docs/embedded-signing-legacy) documentation.

### Step 4: Track signing events (optional)

Use the signing instance's event methods to respond to viewer activity. The library provides events such as `document.loaded`, `document.completed`, and `document.exception`.

For the complete event API, payload structures, and all available methods, see [Signing Session Embed](https://developers.pandadoc.com/docs/signing-session-embed).

## Important considerations

### Signer identity

It is your responsibility to verify the identity of any user who views a document within the signing session. Some use cases legally require [Identity Verification](https://developers.pandadoc.com/docs/enable-verification) to be enabled.

### Redirect configuration

Recipient redirect settings do not apply to embedded signing sessions. Use the `document.completed` event to handle redirection in your application.

## Related

* [Understanding the Document Workflow Lifecycle](https://developers.pandadoc.com/docs/automate-document-workflows) -- how embedded signing fits the overall lifecycle
* [Signing Session Embed](https://developers.pandadoc.com/docs/signing-session-embed) -- complete library API reference
* [Embedded Editing](https://developers.pandadoc.com/docs/embedded-editing-e-token) -- embed the full document editor
* [Embedded Sending](https://developers.pandadoc.com/docs/embedded-sending-e-token) -- embed field placement on PDFs
* [Embedded Editing/Signing Playground](https://developers.pandadoc.com/page/embedded-playground) -- try it without an account