All help topics
Integrations and developersBusiness and up

Embedded signing and allowed origins

Add the https origins allowed to frame your signing pages, then mint a short-lived embed link for one recipient and load it in an iframe.

Updated Open in app

Embedded signing puts the signing page inside your own product, in an iframe. It stays switched off until you list the origins allowed to frame it, which you do at Settings > Developer > Embedding. The Developer section is available on Business and Ultimate, and it's admin-only.

Add an allowed origin

  1. Open Settings > Developer > Embedding.

  2. Type the full origin of the app that will hold the iframe, in the shape shown in the field: https://app.yourcompany.com. Scheme and host, no path.

  3. Click Add, or press Enter. The origin appears in the list below and Unsaved changes shows next to the button.

    The embedding tab with an origin in the list and the Save origins button

  4. Repeat for any other origin that needs it, then click Save origins.

    The embedding tab showing an added origin and the unsaved changes hint

What you type is reduced to scheme, host and port before it's stored, so a full page URL still saves as a clean origin. This screen accepts https only. An origin already on the list is refused with "That origin is already on the list".

What an empty list means

While the list is empty, the page says so in plain terms: "No origins allowed. Embedded signing is off for this workspace." Any attempt to mint an embed link is refused, with a message asking you to add the origins first. Removing your last origin turns embedding off again the moment you save.

With at least one origin saved, your integration asks for a signing URL for one recipient on one document, using the same API key it uses for everything else:

http
POST /v1/documents/:id/recipients/:recipientId/embed-link
Authorization: Bearer sk_live_...
Content-Type: application/json

{
  "expires_in": 900,
  "redirect_url": "https://app.yourcompany.com/signed"
}

Both fields are optional. expires_in is in seconds and defaults to 900. It has to fall between 60 and 3600. Send 30 or 7200 and the request is rejected with a validation error; nothing is quietly adjusted for you. redirect_url has to be https, and it's where the signer's browser goes once they finish.

The response gives you a url and an expires_at. Put the url in the src of your iframe. The link is short-lived, and it stays usable until it expires. Mint one when the signer is ready instead of keeping it in your own records.

What happens next

The signer works inside your page, in your layout, and the completed document behaves like any other. Your audit trail records the same events, and any webhook endpoints you have registered fire exactly as they would for an emailed signing session.

If something goes wrong

  • Add refuses the value. You entered something that isn't a full origin, or it isn't https. A bare domain with no scheme is the usual cause.
  • The link request is refused as not configured. The allowlist is empty, or the last origin was removed and saved. Add one and save.
  • The link request says the document is not in progress. An embed link can only be minted while the document is out for signature. A draft, a completed envelope and a cancelled one are all refused.
  • The request says the recipient already finished. That person has signed or declined. There's nothing left for them to do, so no link is issued.
  • The frame loads blank in your app. The origin doing the framing isn't on the saved list. Compare it exactly, including the port, and remember a subdomain is a separate origin.
  • The link worked earlier and now fails. It expired. Mint a fresh one each time rather than caching it.
FAQ

Frequently asked questions

Why is embedding off until I add an origin?

An empty list is the safe default. A signing page that any site could load in a frame is a clickjacking target, so the allowlist is opt-in per workspace. While it is empty, a request for an embed link is refused with a message telling you to add the origins first.

How long does an embed link last?

Fifteen minutes by default. You can ask for anything between one minute and one hour when you mint it, and the response tells you exactly when it expires. Mint the link at the moment the signer is about to see it rather than storing one for later.

Can I add localhost while developing?

Not from this screen, whose form refuses anything that is not https. The allowlist underneath it does accept http on loopback, so http://localhost:3000, 127.0.0.1 and [::1] are all storable through the embed-origins endpoint your session can call. Every other http origin stays refused.

Do embedded signers still get an email?

That depends on how the document was sent, not on embedding. Embedding gives you a link you place in your own interface for someone already in front of you. Any email the document would normally send goes out on its own schedule regardless.

How many origins can I save?

Twenty. Each is stored as a scheme, host and port with no path, so one entry covers every page on that origin. Duplicates are refused as you add them, and a subdomain is a separate origin that needs its own entry.

Related

Keep going

Did not find what you needed?Send us a message