/api/v1/identity-checks.
Overview
sajn ID checks the BankID identity in one of two ways:- By national ID. If you send
nationalId, BankID verifies the identity, and sajn checks that the personal number matches. - By name. Without
nationalId, sajn checks that the name matchesfullName.
How it works
The verification’sstatus follows these steps, from CREATED to VERIFIED or FAILED. A verification that isn’t completed in time becomes EXPIRED.
Verification statuses
Create a verification
Creating a verification through the API sends it to the person right away, over thechannel you choose. To create one, call POST /identity-checks. The response is the identity check, and it’s the only response that includes verificationUrl.
Verify by national ID
Send the personal number in thenationalId field:
language is optional, and takes an ISO 639-1 code, such as sv or en.
In API version 2026-09, this field is ssn.
Verify by name
Leave outnationalId:
Delivery channels
SMS
sajn sends the verification link by SMS:API-created verifications use
EMAIL or SMS. The channel that the API returns can also be IN_APP, for verifications delivered inside the sajn app.Verification data
After a successful verification, get the identity check to read the BankID response indata. The following excerpt shows the relevant fields:
GET /identity-checks, data is null. Reading it requires the VIEW_SAJN_ID workspace permission, and sajn records each read in the organization’s audit log.
Use cases
Customer onboarding
Verify a customer’s identity when they sign up:Identity without a personal number
Verify a person by name, without collecting their personal number:Before a contract
Verify a person, and link the verification to their contact, before you send them a contract:Link to a contact
To link a verification to a contact, sendcontactId:
Audit log
An identity check that you get by ID includes its audit log inaudits. In a list, audits is null. The following excerpt shows one entry:
ID_CREATED, ID_SENT, ID_RESENT, ID_OPENED, ID_VERIFIED, ID_FAILED, ID_EXPIRED, ID_CANCELED, and ID_REVOKED.
Expiration
A verification and its link expire 7 days after creation by default. To set another expiration, sendexpiresAt when you create the verification. It must be in the future:
expiresAt on the verification object.
Billing
Creating a sajn ID verification counts toward your monthly sajn ID quota and is billed according to your plan.
Security
Token security
Token security
Verification tokens are single use, and expire after completion or when the verification expires.
Personal number encryption
Personal number encryption
sajn encrypts the
nationalId you send at rest and never returns it. The BankID response in data is returned only to users with the VIEW_SAJN_ID permission.Audit trail
Audit trail
The audit log records every step of the verification.
BankID security
BankID security
The identity check runs through Swedish BankID.
Best practices
Reference IDs
Send a
reference to link the verification to your own recordsSet an expiration
Use
expiresAt to control how long the verification link stays validCollect less
Send
nationalId only when you need it. Verifying by name collects less personal dataUse webhooks
Subscribe to the
identity_check.verified and identity_check.failed webhook events instead of pollingNext steps
Identity verification guide
Step-by-step guide to implementing ID checks
API reference
Create an identity check

