requiredSignature: how the party signs, such as with a drawn signature or with BankID.twoStepVerification: an optional check the party passes before signing, such as an SMS code.
documentMeta.accessVerification, a check that every party passes before the document opens.
For what each method proves legally, see Signing methods.
Before you begin
- Store your API key in the
SAJN_API_KEYenvironment variable. To create a key, go to workspace settings in the sajn app, then Utvecklare (Developer) > API-nycklar (API keys). - Have a
DRAFTdocument with parties. For more information, see Create a document.
Signing methods
The following values are available forrequiredSignature:
DRAWING and CLICK_TO_SIGN prove that the party intended to sign. The eID methods also prove who signed. With an eID, an optional nationalId on the party is matched against the eID; without one, sajn matches the name.
The API accepts the Norwegian BankID values in the schema, such as NO_BANKID_BIOMETRIC, but rejects them with the message This eID scheme is not yet available until the scheme is switched on. NONE and MANUAL are derived values: a party gets NONE when its role doesn’t sign, and MANUAL marks a document imported after paper signing.
If you leave out requiredSignature, the party gets the workspace’s default signing method. Without a workspace default, the party gets the national eID of your organization’s country, or DRAWING when the country has none.
Set the methods on a document
1
List the methods you can offer
Build your picker from the API instead of a hard-coded list, because eID schemes are switched on market by market:The response lists the eID methods first, then the generic ones:The list shows which methods sajn offers, not which your plan includes. For the plan rule, see Plan availability.
2
Set a method per party
Parties on the same document can use different methods. Set Replace
requiredSignature when you add the party, or update it on a draft:TEMPLATE_ID with the ID of a template. country is the party’s ISO 3166-1 alpha-2 country code. To change the method later, send a PATCH request to /api/v1/documents/DOCUMENT_ID/parties/PARTY_ID with requiredSignature.3
Optional: Add a verification step
To make a party verify before signing, set To make every party verify before the document even opens, set For the values, see the following section.
twoStepVerification. The following update asks Kai for a one-time SMS code. An SMS code needs a phone number on the party:documentMeta.accessVerification on the document instead:Verification steps
BothtwoStepVerification and accessVerification take the following values. To list them with labels, call List selectable verification gates.
Use
twoStepVerification to protect the signature of one party, and accessVerification to protect the content of the whole document. A party who signs with an eID is already identified, so an eID verification step on top of an eID signature is a second, separately billed eID transaction.
eID schemes by country
Plan availability
Which eID schemes an organization can use depends on its plan:- On paid plans from Solo upward, every scheme in the preceding table is available.
- On the free plan, only the national eID with included signatures is available, such as
SE_BANKIDfor a Swedish organization. - In a sandbox organization, every scheme is available.
Read how a party was verified
After signing, each party hasidentityVerified, which is true when an eID verified the party through the signature or a verification step. identityMismatch is true when the eID identity didn’t match the intended party and the signature was still recorded. For the verified identities, call Get verified signer identities.
Handle errors
400 VALIDATION_FAILEDwith the messageThis eID scheme is not yet available: the scheme isn’t switched on. Pick a method from/helpers/signature-methods.403 PERMISSION_DENIEDon send: a party’s signing method or verification step isn’t included in your plan. TheuserMessagenames the method.
Next steps
Signing methods
Learn what each method proves.
Verify identity with sajn ID
Verify a person without a document.
Send for signing
Send the document to its parties.

