A product shows the signing page inside its own page, so the signer never leaves the product. In embedded signing the product has already signed the person in, which is how the signer is verified (verification: product_session). Embedded is the default delivery. The other delivery modes, email, link and in person, are described at the end of this guide. For a plain explanation of the idea, read Embedded Signing: Add E-Signatures to Your Own App.
1. List Your Domains
Each application has a list of domains allowed to embed signing, for example app.example.com or *.example.com (every subdomain), or * alone for every https site, which suits a product with white label customers on their own domains. Live envelopes can be embedded only on those domains, over https. Test envelopes can be embedded anywhere, so a developer can try it from any page.
2. Create the Envelope on Your Server
POST /api/v1/envelopes with the PDF and the signer (see the API contract). Keep the envelope id and the recipient id.
3. Ask for a Signing URL When the Signer Opens the Page
POST /api/v1/envelopes/{id}/signing-url with {"recipientId": "..."}. The URL works once and expires after five minutes, so ask for it each time the page opens. Never put it in an email.
4. Open It in the Page
<script src="https://sign.interactivelion.com/embed/interactive-sign.js"></script>
<div id="sign-here" style="height: 80vh"></div>
<script>
InteractiveSign.open(signingUrlFromYourServer, {
container: document.getElementById('sign-here'), // leave out for a full screen window
onReady: function (e) { },
onSigned: function (e) { /* e.envelopeId, e.recipientId */ },
onCompleted: function (e) { /* the sealed copy is ready */ },
onDeclined: function (e) { /* e.reason */ },
onClosed: function (e) { },
onError: function (e) { /* e.message */ }
});
</script>
Without container, the script opens a full screen window with a Close button; the Escape key closes it too. The script passes your page's origin to the signing page, which checks it against your domain list, and the browser enforces the same list through the signing page's Content-Security-Policy frame-ancestors.
Events reach your handlers only from the signing page's own origin and from the frame the script opened. Treat them as a hint for the user interface; your server learns the outcome from the webhook (or by polling the envelope), and only that should change your records.
What the Signer Sees
- The electronic records and signatures disclosure, until they accept it. Acceptance is recorded with the disclosure's version and hash.
- The document, rendered with a self hosted PDF.js. The text can be selected, so phone speak selection and screen readers can read it.
- Real form controls placed over each field, a Next Field button and a count of completed fields.
- An Adopt Your Signature window: type the name and pick one of three script fonts, or draw with a finger, stylus or mouse. Documents with no signature field get Accept and Sign (click to accept) when the envelope allows it.
- Finish, then a confirmation with a download of the signed copy once it is sealed. Decline to Sign asks for a reason.
The Signing Session
The signing page exchanges the single use token for a session token held in the page's memory, not in a cookie, because browsers block third party cookies inside iframes. Reloading the page needs a new signing URL from your server.
Trying It
Create an envelope with a test key, which makes a test envelope, and open it this way from any page. Test envelopes carry a watermark, are never legally binding and never count toward a plan.
Viewers On Embedded Envelopes
A recipient with role viewer (the API also accepts cc) signs nothing. On an embedded envelope the viewers are emailed the completed copy, with the sealed PDF attached, once the envelope is completed. The signers of an embedded envelope get no email, because the product shows them their copy. An approver on an embedded envelope opens the page the same way a signer does and presses Approve instead of signing.
Other Delivery Modes
delivery: email makes Interactive Sign email each signer and approver an invitation with a link, send reminders every reminderDays days, and email the completed copy to everyone.
delivery: link makes no email at all. The product asks for each recipient's link with POST /api/v1/envelopes/{id}/recipient-link and delivers it itself, for example in its own email or text message. This is how a live envelope can be signed outside an embedding page.
An email or link opens the signing page as a page of its own, never in a frame (the page sends frame-ancestors 'none'), so no domain check applies. It first shows a landing page that names the sender and the document with an Open Document button. Opening the landing page uses nothing up, so a mail scanner that follows the link cannot spend it. Only Open Document uses up the link. A link that was already used offers Email Me a New Link on an email envelope. A link lasts EmailLink.LifetimeDays (30 by default) or until the envelope expires.
signingOrder: sequential lets each recipient act only after the ones before them (by routingOrder) have finished; the others see a page that says it is not their turn yet, and the session exchange answers 409 not_your_turn. parallel, the default, lets everyone act at once.
A recipient's verification can also be email_code (a six digit code emailed to them when they press Email Me a Code) or access_code (a code the sender gives them some other way, set with accessCode). Until the code is entered the page shows only the subject, the brand and the recipient's name. After five wrong codes in a row the recipient is locked out for 30 minutes. Codes ignore spaces and are case sensitive.
A recipient's verification can also be sms_code, with a phone in international form: a six digit code is texted to them, with the same limits and lockout as an email code, where the account's plan includes SMS codes.
In person signing is for a signer in the room: the product asks POST /api/v1/envelopes/{id}/in-person-url with the recipient and the host (the person handing over the device), and opens the single use link on the host's device. No code is asked for, and the host is on the audit trail and the certificate. It works with any delivery mode, embedded included.
Reassign lets a signer or approver of an email or link delivery envelope hand their place to another person with a reason, when the envelope says allowReassign: true (the default is false, and the application setting default.allowReassign can change that default). It is never offered on an embedded envelope, during in person signing, or to a recipient verified by an access code, because there the product or the host already knows who is signing. The webhook gets recipient.reassigned.
expiresAt or expiresInDays makes the envelope expire; the worker then stops it, sends envelope.expired and, on an email envelope, emails the recipients who were invited.