signingUrl, and the browser put that token in the iframe URL. In 1.0, your server creates an embed session, and the browser gets only a client secret that the frame redeems once. The token never reaches the browser.
When v1 stops working
SDK 0.x and the v1 frame routes keep working until a retirement date that sajn announces, 12 months after embed v2 is generally available. sajn announces the date in this documentation, in the changelog, and directly to each organization with embedding turned on. After that date, a v1 frame shows an error instead of the document.What changes
The following stays the same:- You create and send the document with the party’s
deliveryset to[]. - You confirm signatures with the
document.party.signedwebhook. - The embed domains still decide which sites can show the frame.
- Your server creates a session. Instead of reading the token from the party’s
signingUrl, your server callsPOST /api/v1/embed-sessionsand returns theclientSecret. The endpoint needs API version2026-10. - Options move to the server. Rejection, signature modes, and the frame’s other features are set on the session, and the browser can’t change them.
- Events use API names.
signerIdbecomespartyId, and events carryexternalIdinstead of the token. - A wildcard no longer covers the apex. In v1,
*.example.comalso matchedexample.com. In 1.0 it matches only subdomains. If you embed onexample.com, addexample.comto the embed domains. - The read-only viewer is a session. Create the session with
type: "viewing"and show it withViewingEmbedorcreateViewingEmbed. The Web Components are<sajn-signing-embed>and<sajn-viewing-embed>, and they take aclient-secret-urlinstead of a token.
Migrate your integration
1
Replace the token lookup with a session
Remove the server code that reads The SDK calls this endpoint again each time a session ends, so create a new session on every call. For every field, see Create session request.
token from signingUrl, and create a session instead:2
Install SDK 1.0
https://unpkg.com/@sajn/[email protected]/dist/index.umd.js.3
Replace the component
Replace For JavaScript, replace
documentId and token with fetchClientSecret, and rename the callbacks:embedSignDocument({ element, ... }) with createSigningEmbed({ container, ... }). container takes an element, not a CSS selector. For Vue, replace <EmbedSignDocument> with <SigningEmbed>.4
Check your embed domains
In the sajn app, go to Inställningar > Utvecklare > Inbäddning (Settings > Developer > Embedding). Make sure that every origin you send in
origins matches a domain in the list, and add the apex domain if you embed on it.5
Test in a sandbox
Run the flow in a sandbox: sign, reject if you turned on
rejection, and let a session expire to see the SDK fetch a new one.Options
Events
The event data changes as follows:
signerIdis nowpartyId.tokenis gone, andexternalIdis new.onRejectedcarriesreasonGiven, a boolean, instead of the reason text. The reason text isn’t sent to the browser.onSignedhas nofailedfield. A failure arrives inonErrorwith a code.
onVerified, onStateChange, onResize, and onSessionExpired. For all events, see Events.
Next steps
Embedded signing
See the session request, the appearance, the events, and the error codes.
Embed signing in your app
Run the whole flow from server to frame.

