@luminpdf/lumin-embed-signing-sdk. For redirect flows, use Get Signing Link instead.
When to use embedded signing
- Signers are already authenticated in your app and you want an in-context experience.
- You control when and how the signing prompt appears (modal, inline panel, dedicated step).
- You are building for web or mobile webview, not a native-only flow without a hosted shell page.
Lumin does not authenticate signers in embedded flows. Your app is responsible
for verifying that the person opening the signing surface is the intended
recipient.
Prerequisites
Before you integrate embedded signing, make sure you have:- An API key or OAuth 2.0 app with the
sign:requestsscope. Create these yourself in Settings → Developer settings in the Lumin app. See API Keys or OAuth 2.0. - An embedding domain allow-listed for that API key or OAuth app. Embedded signing only works when your host page origin matches an allow-listed domain.
- Signature requests created through the public API (
POST /signature_request/sendorPOST /signature_request/send-from-template). In-app agreements created from the Lumin UI are not embeddable.
Workflow overview
Webhooks are the source of truth for server-side state. SDK events are for
host-app UX only, do not persist business state from client-side events alone.
Integration steps
Set up credentials and domain
Create an API key or OAuth app in Settings → Developer settings (API Keys, OAuth 2.0). Then contact Lumin Support to allow-list embedding domain registration for API key/OAuth client.
Create a signature request
From your backend, send the document with
POST /signature_request/send or POST /signature_request/send-from-template. See Send Signature Request.Mint a signing session
Call
POST /signature_request/{id}/signing-session with the signer’s email and pass the returned sign_url to your frontend. See Create Signing Session.Embed the signing UI
Install
@luminpdf/lumin-embed-signing-sdk, initialize the client once, then call client.open({ signUrl }) when the signer is ready.API examples
Create a signature request
signature_request_id from the response. If the status is WAITING_FOR_PROCESSING, poll GET /signature_request/{id} until the request is ready to sign.
Mint a signing session
SDK example
Events and webhooks
| Event | When it fires | Recommended action |
|---|---|---|
loaded | Signing UI is ready | Hide your loading state |
signed | Signer completed signing | Show a thank-you state; wait for webhook |
declined | Signer declined | Show a message; wait for webhook |
expire | sign_url TTL elapsed | Mint a new session from your backend |
error | Signing aborted | See Domain verification for common codes |
close | Iframe torn down | Final cleanup |
signature_request_signed and signature_request_approved webhooks to advance your workflow. See the Webhooks guide.
Domain verification
Embedded signing validates the parent page origin when the iframe loads. The signing surface renders only when the origin matches a domain allow-listed for the API key or OAuth app that minted the session. Commonerror codes related to domains and sessions:
| Code | Meaning |
|---|---|
origin_not_allowed | Parent origin is not on your app’s allow-list |
session_expired | sign_url was used after its TTL — mint a new session |
session_already_used | The same sign_url was mounted twice — mint a new session |
signature_request_no_longer_active | Request cancelled or expired while iframe was open |
Mobile webview
Native apps must load the SDK through a hosted shell page on your verified HTTPS domain (for example,https://app.example.com/sign-shell). You cannot bundle the SDK as a static file:// asset, the origin check will fail.
Pass sign_url from your native backend into the webview shell via a query parameter or JavaScript bridge. The shell mounts the SDK the same way a desktop browser would.
Email delivery
Embedded signing does not automatically suppress Lumin email notifications. Signers may still receive email from Lumin.Related resources
- Send Signature Request — create signing requests from a PDF
- Create Signing Session — API reference for this endpoint
- Get Signing Link — redirect or hosted signing (not for iframe embed)
- Webhooks overview — server-side completion events
- Authentication — API keys and OAuth 2.0