Help centre

Embedded signing: put the ceremony in your own product

Generate a short-lived signing URL, register your allowed origins and frame the signing page in your own app.

Instead of emailing your user out to SignSpry, keep them in your own product. Ask the API for a short-lived signing URL and put it in an iframe.

Before you start

  1. Register your site's origin. Under API & webhooks → OAuth applications, fill in Allowed origins (for embedding), for example https://yourapp.com (an origin is the scheme and host, with no path). Use https://, or http://localhost while developing; separate several with commas or new lines.
  2. Use an API key (or token) belonging to the same SignSpry user who registered the application. Allowed origins are looked up for the user who owns the envelope.
  3. Send the envelope so it is out for signature. See the quickstart.
Only registered origins may frame the signing page; for any other site the browser refuses. Up to 20 origins across your applications are used. This is what stops someone else embedding your signing sessions.

Get a URL

POST /api/v1/envelopes/{id}/recipients/{recipient_id}/embed
{ "return_url": "https://yourapp.com/signed" }

The key needs the envelopes:write scope. The response:

{ "ok": true,
  "url": "https://signspry.com/sign/<token>?embed=1",
  "recipient_id": "…",
  "expires_at": 1787560000 }

The URL is issued with a 15-minute lifetime (expires_at, in Unix seconds) for that one recipient. Request it when the person is about to sign, not in advance. Each new URL replaces the earlier one for that recipient.

It fails with 409 if the envelope is not out for signature or that recipient has already finished.

POST …/signing-link is the plain alternative: a signing URL you can redirect to or open in a frame (add ?embed=1 for the embedded view).

Frame it

<iframe src="URL-FROM-THE-RESPONSE" width="100%" height="800"
        style="border:0"></iframe>

The embedded view drops SignSpry's navigation and shows the document and signing controls. Everything else still applies: routing order, access codes, one-time codes and any other protection on the link. A signer who has to wait for others sees a waiting page.

Knowing when signing ends

SignSpry does not post messages to your page. Set a return_url, and when the signer finishes or declines, the frame goes there with the result added:

https://yourapp.com/signed?envelope=<id>&event=signed

event is signed or declined. Your page in the frame can then tell the rest of your app.

Do not treat the redirect as proof; it comes from a browser. Confirm on your server with a webhook (recipient.signed, envelope.completed) or by reading the envelope through the API.

Testing

A test key or test application works here too and sends nothing to a real inbox. See The sandbox.

Was this useful?