Developer · 3 min read
Sign inside your own app (embedded)
By default we email each signer a private link. If you’d rather keep people inside your own app, you can embed the signing page in an <iframe> instead.
1. Send with embed
Add "embed": true when you create the document. We skip the signer emails and hand you signing links in the reply:
POST https://sealedinblack.com/api/v1/esign/documents
Authorization: Bearer YOUR_sib_KEY
{
"template_id": 8,
"embed": true,
"signers": [ { "name": "Test Partner", "email": "partner@example.com" } ],
"fields": { "partner_name": "Test Partner LLC" }
}
The reply adds a signing_links list — one entry per signer who can sign right now (in sequential order, that’s just the first person):
"signing_links": [
{ "signer": { "name": "Test Partner", "email": "partner@example.com", "status": "sent" },
"url": "https://sealedinblack.com/s/AbC123…",
"expires_at": "2026-08-01T00:00:00+00:00" }
]
2. Put the URL in an iframe
<iframe src="https://sealedinblack.com/s/AbC123…"
style="width:100%;height:800px;border:0"></iframe>
Our signing pages allow embedding (the secret token in the URL is the security), so the page loads right inside your site.
3. Know when they finish
When the signer finishes (or declines) the page sends your window a message — listen for it and close the iframe or show a success screen:
window.addEventListener('message', (e) => {
if (e.data && e.data.source === 'sealedinblack') {
// e.data.event is 'completed' or 'declined'
// e.data.document_id tells you which one
}
});
Need the next signer’s link?
In sequential order, once the first person signs, ask for the next person’s embed link:
POST https://sealedinblack.com/api/v1/esign/documents/337/signing-link
Authorization: Bearer YOUR_sib_KEY
{ "email": "second-signer@example.com" }
You still get the completed webhook and the sealed signed_pdf_url exactly as with emailed signing.